BPKButton
@interface BPKButton : UIButton
BPKButton is a subclass of UIButton configured with Skyscanner style properties.
-
The title displayed by the button.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *title;Swift
var title: String? { get set } -
Sets the image displayed by the receiver.
Declaration
Objective-C
- (void)setImage:(UIImage *_Nullable)image;Swift
func setImage(_ image: UIImage?)Parameters
imageThe image to display. If
nilthe image is removed. -
Creates a
BPKButtonwith a specific size and style.See
BPKButtonSizeSee
BPKButtonStyleDeclaration
Objective-C
- (nonnull instancetype)initWithSize:(BPKButtonSize)size style:(BPKButtonStyle)style;Swift
init(size: BPKButtonSize, style: BPKButtonStyle)Parameters
sizeSize to be used by the button.
styleStyle of the button.
Return Value
BPKButtoninstance. -
Creates a
BPKButtonwith 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
BPKButtoninstance. -
Create a
BPKButtonwith a given frame.Declaration
Objective-C
- (nonnull instancetype)initWithFrame:(CGRect)frame;Swift
init(frame: CGRect)Parameters
frameThe initial frame of the button.
Return Value
BPKButtoninstance. -
Size of the button
See
BPKButtonSizeDeclaration
Objective-C
@property (nonatomic) BPKButtonSize size;Swift
var size: BPKButtonSize { get set } -
Style of the button
See
BPKButtonStyleDeclaration
Objective-C
@property (nonatomic) BPKButtonStyle style;Swift
var style: BPKButtonStyle { get set } -
Position of the image in the button. This has no effect for icon only buttons.
See
BPKButtonImagePositionDeclaration
Objective-C
@property (nonatomic) BPKButtonImagePosition imagePosition;Swift
var imagePosition: BPKButtonImagePosition { get set } -
Setting this property to YES will change the button state. Loading state will disable the button.
Declaration
Objective-C
@property (nonatomic) BOOL isLoading;Swift
var isLoading: Bool { get set }
BPKButton Class Reference