BPKBadge

@interface BPKBadge : UIView

BPKBadge is a subclass of UIView which contains the Skyscanner badge style.

  • :nodoc:

    Declaration

    Objective-C

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

    Swift

    init(frame: CGRect)
  • The type of the badge.

    Declaration

    Objective-C

    @property (nonatomic) BPKBadgeType type;

    Swift

    var type: BPKBadgeType { get set }
  • The message to show inside the badge.

    Declaration

    Objective-C

    @property (nonatomic, copy) NSString *_Nonnull message;

    Swift

    var message: String { get set }
  • Create a BPKBadge with the given message.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithMessage:(nonnull NSString *)message;

    Swift

    convenience init(message: String)

    Parameters

    message

    The message to show in the badge.

  • Create a BPKBadge with the given message and type.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithType:(BPKBadgeType)type
                                 message:(nonnull NSString *)message;

    Swift

    init(type: BPKBadgeType, message: String)

    Parameters

    type

    The type of badge to create.

    message

    The message to show in the badge.