BPKSwitch
@interface BPKSwitch : UISwitch
BPKSwitch is a subclass of UISwitch configured with Skyscanner style properties.
-
Creates a
BPKSwitchwith a decoder (typically when creating from storyboards)Declaration
Objective-C
- (nonnull instancetype)initWithCoder:(nonnull NSCoder *)coder;Swift
init(coder: NSCoder)Parameters
coderDecoder object to extract parameters from
Return Value
BPKSwitchinstance. -
Create a
BPKSwitchwith a given frame.Declaration
Objective-C
- (nonnull instancetype)initWithFrame:(CGRect)frame;Swift
init(frame: CGRect)Parameters
frameThe initial frame of the switch.
Return Value
BPKSwitchinstance. -
The primary color of the reciever. This is used to control the
onTintColor.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 }
BPKSwitch Class Reference