UIBarButtonItem
class UIBarButtonItem : UIBarItem, NSCoding
-
Localizing button title
Declaration
Swift
@objc open var localizedTitle: String? { get set }
-
Declaration
Swift
open override func awakeFromNib()
-
Initializes a new item using the specified localizedt itle and other properties.
Declaration
Swift
convenience public init(localizedTitle: String, style: UIBarButtonItem.Style, target: Any?, action: Selector?)
Parameters
localizedTitle
The localized item’s title key.
style
The style of the item. One of the constants defined in UIBarButtonItemStyle.
target
The object that receives the action message.
action
The action to send to target when this item is selected.
Return Value
Newly initialized item with the specified properties.
-
Sets the localized bar button item title with format.
Declaration
Swift
@discardableResult convenience public init(formatKey: String, style: UIBarButtonItem.Style, target: Any?, action: Selector?, _ arguments: CVarArg...)
Parameters
text
The text to localize
arguments
The arguments to replace