BPKChip
@interface BPKChip : UIControl
BPKChip is a subclass of UIControl configured with Skyscanner style properties.
-
The title to display inside the chip.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *title;Swift
var title: String? { get set } -
Creates a
BPKChipwith the title given.Declaration
Objective-C
- (nonnull instancetype)initWithTitle:(nonnull NSString *)title;Swift
init(title: String)Parameters
titleNSString to use as the title.
-
Creates a
BPKChipwith a decoder (typically when creating from Storyboards)Declaration
Objective-C
- (nullable instancetype)initWithCoder:(nonnull NSCoder *)aDecoder;Swift
init?(coder aDecoder: NSCoder)Parameters
aDecoderDecoder object to extract parameters from
Return Value
BPKChipinstance. -
Create a
BPKChipwith a given frame.Declaration
Objective-C
- (nonnull instancetype)initWithFrame:(CGRect)frame;Swift
init(frame: CGRect)Parameters
frameThe initial frame of the chip.
Return Value
BPKChipinstance. -
The primary color of the reciever. This is used to control the selected background colour.
Warning
This is not intended to be used directly, it exists to support theming only.Declaration
Objective-C
@property (nonatomic, strong, nullable) UIColor *primaryColor;Swift
var primaryColor: UIColor? { get set } -
An optional custom background.
Declaration
Objective-C
@property (nonatomic, nullable) UIColor *backgroundTint;Swift
var backgroundTint: UIColor? { get set } -
An optional icon
Declaration
Objective-C
@property(nullable, nonatomic, copy) BPKIconName iconNameSwift
var iconName: Int32 { get set } -
Style of the chip. Default is BPKChipStyleOutline.
Declaration
Objective-C
@property (nonatomic) BPKChipStyle style;Swift
var style: BPKChipStyle { get set }
BPKChip Class Reference