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 BPKCard with padded initially set.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPadded:(BOOL)padded;

    Swift

    convenience init(padded: Bool)

    Parameters

    padded

    Whether the card should have padding or not.

  • Create a BPKCard with padded and cornerStyle initially set.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPadded:(BOOL)padded
                               cornerStyle:(BPKCardCornerStyle)cornerStyle;

    Swift

    init(padded: Bool, cornerStyle: BPKCardCornerStyle)

    Parameters

    padded

    Whether the card should have padding or not.

    cornerStyle

    The corner style that the card should have.

  • Create a BPKCard with a given frame.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithFrame:(CGRect)frame;

    Swift

    init(frame: CGRect)

    Parameters

    frame

    The initial frame of the card.

    Return Value

    BPKCard instance.

  • Creates a BPKCard 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

    BPKCard instance.