BPKHorizontalNavigationOption
@interface BPKHorizontalNavigationOption
: NSObject <BPKHorizontalNavigationOptionType>
A single option within a horizontal navigation.
Can be configured to show an optional icon, always includes a name.
-
Name of the optional icon used in the option.
Declaration
Objective-C
@property(nonatomic, readonly, strong, nullable) BPKIconName iconName
Swift
var iconName: Int32 { get }
-
A tag representing the option, can be used to distinguish options from eachother.
Declaration
Objective-C
@property (nonatomic, readonly) NSInteger tag;
Swift
var tag: Int { get }
-
Name of the option displayed in the horizontal nav.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull name;
Swift
var name: String { get }
-
Whether the option has an icon. True if
iconName
is non-nil.Declaration
Objective-C
@property (nonatomic, readonly) BOOL hasIcon;
Swift
var hasIcon: Bool { get }
-
Intialize an option with a given name.
Declaration
Objective-C
- (nonnull instancetype)initWithName:(nonnull NSString *)name;
Swift
init(name: String)
Parameters
name
The name of the option.
Return Value
A named option.
-
Intialize an option with a given name and tag.
Declaration
Objective-C
- (nonnull instancetype)initWithName:(nonnull NSString *)name tag:(NSInteger)tag;
Swift
init(name: String, tag: Int)
Parameters
name
The name of the option.
tag
The tag of the option.
Return Value
A named option with a tag.
-
Intialize an option with a given name and icon.
Declaration
Objective-C
- (nonnull instancetype)initWithName:(nonnull NSString *)name iconName:(id)iconName;
Swift
init(name: String, iconName: Any!)
Parameters
name
The name of the option.
iconName
The name of the icon to display.
Return Value
A named option with an icon.
-
Intialize an option with a given name, tag, and icon.
Declaration
Objective-C
- (nonnull instancetype)initWithName:(nonnull NSString *)name iconName:(id)iconName tag:(NSInteger)tag;
Swift
init(name: String, iconName: Any!, tag: Int)
Parameters
name
The name of the option.
iconName
The name of the icon to display.
tag
The tag of the option.
Return Value
A named option with an icon and a tag.
-
Intialize an option with a given name, tag, and icon.
Declaration
Objective-C
- (nonnull instancetype)initWithName:(nonnull NSString *)name tag:(NSInteger)tag showNotificationDot:(BOOL)showDot;
Swift
init(name: String, tag: Int, showNotificationDot showDot: Bool)
Parameters
name
The name of the option.
tag
The tag of the option.
showDot
send YES to show a red notification dot
Return Value
A named option with a tag and a notification dot.
-
Intialize an option with a given name, tag, and icon.
Declaration
Objective-C
- (nonnull instancetype)initWithName:(nonnull NSString *)name tag:(NSInteger)tag iconName:(id)iconName showNotificationDot:(BOOL)showDot;
Swift
init(name: String, tag: Int, iconName: Any!, showNotificationDot showDot: Bool)
Parameters
name
The name of the option.
tag
The tag of the option.
iconName
The name of the icon to display.
showDot
send YES to show a red notification dot
Return Value
A named option with an icon, a tag and a notification dot.