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
localizedTitleThe localized item’s title key.
styleThe style of the item. One of the constants defined in UIBarButtonItemStyle.
targetThe object that receives the action message.
actionThe 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
textThe text to localize
argumentsThe arguments to replace
View on GitHub
UIBarButtonItem Extension Reference