BPKIconView
@interface BPKIconView : UIImageView
A UIImageView subclass that makes working with Backpack icons easier for cases
where a single icon is used and colour is controlled via tintColor. The icon is
always rendered using template rendering.
-
Initializes and returns a Backpack Icon View with the specific icon name and size.
Declaration
Objective-C
- (nonnull instancetype)initWithIconName:(nullable BPKIconName)iconName size:(BPKIconSize)size;Swift
init(iconName: BPKIconName?, size: BPKIconSize)Parameters
iconNameThe name of the Backpack icon to display in the view.
sizeThe size the icon should be displayed at.
Return Value
An initialized Backpack icon view
-
The name of the icon currently being displayed. Setting updates the displayed icon.
Declaration
Objective-C
@property (nonatomic, copy, nullable) BPKIconName iconName;Swift
var iconName: BPKIconName? { get set } -
The size of the icon currently being displayed. Setting updates the displayed icon.
See
BPKIconSizeDeclaration
Objective-C
@property (nonatomic) BPKIconSize size;Swift
var size: BPKIconSize { get set } -
If flipsForRightToLeft is set to YES then BPKIconView will render its icon horizontally flipped when its UIUserInterfaceLayoutDirection is right to left. Default value is NO.
Declaration
Objective-C
@property (nonatomic) BOOL flipsForRightToLeft;Swift
var flipsForRightToLeft: Bool { get set }
BPKIconView Class Reference