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
BPKChip
with the title given.Declaration
Objective-C
- (nonnull instancetype)initWithTitle:(nonnull NSString *)title;
Swift
init(title: String)
Parameters
title
NSString to use as the title.
-
Creates a
BPKChip
with a decoder (typically when creating from Storyboards)Declaration
Objective-C
- (nullable instancetype)initWithCoder:(nonnull NSCoder *)aDecoder;
Swift
init?(coder aDecoder: NSCoder)
Parameters
aDecoder
Decoder object to extract parameters from
Return Value
BPKChip
instance. -
Create a
BPKChip
with a given frame.Declaration
Objective-C
- (nonnull instancetype)initWithFrame:(CGRect)frame;
Swift
init(frame: CGRect)
Parameters
frame
The initial frame of the chip.
Return Value
BPKChip
instance. -
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 iconName
Swift
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 }