TabBarItem
@MainActor
open class TabBarItem : UITabBarItem
FWTabBarItem inherits from UITabBarItem, the purpose is to provide UITabBarItem property settings for FWTabBarItemContentView. Support most commonly used attributes, such as image, selectedImage, title, tag etc.
Unsupport properties: MARK: UIBarItem properties 1. var landscapeImagePhone: UIImage? 2. var imageInsets: UIEdgeInsets 3. var landscapeImagePhoneInsets: UIEdgeInsets 4. func setTitleTextAttributes(_ attributes: [String : Any]?, for state: UIControlState) 5. func titleTextAttributes(for state: UIControlState) -> [String : Any]? MARK: UITabBarItem properties 1. func setBadgeTextAttributes(_ textAttributes: [String : Any]?, for state: UIControlState) 2. func badgeTextAttributes(for state: UIControlState) -> [String : Any]?
-
The receiver’s tag, an application-supplied integer that you can use to identify bar item objects in your application. default is
0
Declaration
Swift
@MainActor override open var tag: Int { get set }
-
A Boolean value indicating whether the item is enabled, default is
YES
.Declaration
Swift
@MainActor override open var isEnabled: Bool { get set }
-
The title displayed on the item, default is
nil
Declaration
Swift
@MainActor override open var title: String? { get set }
-
The image used to represent the item, default is
nil
Declaration
Swift
@MainActor override open var image: UIImage? { get set }
-
The imageURL used to represent the item, default is
nil
Declaration
Swift
@MainActor open var imageURL: String? { get set }
-
The image displayed when the tab bar item is selected, default is
nil
.Declaration
Swift
@MainActor override open var selectedImage: UIImage? { get set }
-
The imageURL displayed when the tab bar item is selected, default is
nil
.Declaration
Swift
@MainActor open var selectedImageURL: String? { get set }
-
Text that is displayed in the upper-right corner of the item with a surrounding red oval, default is
nil
.Declaration
Swift
@MainActor override open var badgeValue: String? { get set }
-
The offset to use to adjust the title position, default is
UIOffset.zero
.Declaration
Swift
@MainActor override open var titlePositionAdjustment: UIOffset { get set }
-
The background color to apply to the badge, make it available for iOS8.0 and later. If this item displays a badge, this color will be used for the badge’s background. If set to nil, the default background color will be used instead.
Declaration
Swift
@MainActor override open var badgeColor: UIColor? { get set }
-
Customize content view, default is
TabBarItemContentView
Declaration
Swift
@MainActor open var contentView: TabBarItemContentView { get set }
-
The unselected image is autogenerated from the image argument. The selected image is autogenerated from the selectedImage if provided and the image argument otherwise. To prevent system coloring, provide images with UIImageRenderingModeAlwaysOriginal (see UIImage.h)
Declaration
Swift
@MainActor public init(_ contentView: TabBarItemContentView = TabBarItemContentView(), title: String? = nil, image: Any? = nil, selectedImage: Any? = nil, tag: Int = 0)
-
Undocumented
Declaration
Swift
@MainActor override public init()
-
Undocumented
Declaration
Swift
@MainActor public required init?(coder aDecoder: NSCoder)