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
BPKBadgewith the given message.Declaration
Objective-C
- (nonnull instancetype)initWithMessage:(nonnull NSString *)message;Swift
convenience init(message: String)Parameters
messageThe message to show in the badge.
-
Create a
BPKBadgewith the given message and type.Declaration
Objective-C
- (nonnull instancetype)initWithType:(BPKBadgeType)type message:(nonnull NSString *)message;Swift
init(type: BPKBadgeType, message: String)Parameters
typeThe type of badge to create.
messageThe message to show in the badge.
BPKBadge Class Reference