BPKCard
@interface BPKCard : UIControl
BPKCard is a subclass of UIControl which contains the Skyscanner card style.
Cards are a lightweight control with a shadow.
Cards can be configured to have padding or not.
-
Whether the card should provide padding or not.
Declaration
Objective-C
@property (nonatomic, getter=isPadded) BOOL padded;Swift
var isPadded: Bool { get set } -
The corner-style to apply to the card.
Declaration
Objective-C
@property (nonatomic) BPKCardCornerStyle cornerStyle;Swift
var cornerStyle: BPKCardCornerStyle { get set } -
The view to display within the card.
Declaration
Objective-C
@property (nonatomic, nullable) UIView *subview;Swift
unowned(unsafe) var subview: UIView? { get set } -
Create a
BPKCardwith padded initially set.Declaration
Objective-C
- (nonnull instancetype)initWithPadded:(BOOL)padded;Swift
convenience init(padded: Bool)Parameters
paddedWhether the card should have padding or not.
-
Create a
BPKCardwith padded and cornerStyle initially set.Declaration
Objective-C
- (nonnull instancetype)initWithPadded:(BOOL)padded cornerStyle:(BPKCardCornerStyle)cornerStyle;Swift
init(padded: Bool, cornerStyle: BPKCardCornerStyle)Parameters
paddedWhether the card should have padding or not.
cornerStyleThe corner style that the card should have.
-
Create a
BPKCardwith a given frame.Declaration
Objective-C
- (nonnull instancetype)initWithFrame:(CGRect)frame;Swift
init(frame: CGRect)Parameters
frameThe initial frame of the card.
Return Value
BPKCardinstance. -
Creates a
BPKCardwith 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
BPKCardinstance.
BPKCard Class Reference