BPKOverlayView
@interface BPKOverlayView : UIView
BPKOverlayView
is a subclass of UIView
which allows you to apply Skyscanner style tints to background content.
-
The corner-style to apply to the card. Default is None.
Declaration
Objective-C
@property (nonatomic) BPKOverlayViewCornerStyle cornerStyle;
Swift
var cornerStyle: BPKOverlayViewCornerStyle { get set }
-
The kind of overlay to apply to the view. Default is Tint.
Declaration
Objective-C
@property (nonatomic) BPKOverlayViewOverlayType overlayType;
Swift
var overlayType: BPKOverlayViewOverlayType { get set }
-
The view to display in front of the tint.
Declaration
Objective-C
@property (nonatomic, strong, readonly) UIView *_Nonnull foregroundView;
Swift
var foregroundView: UIView { get }
-
The view to display behind the tint.
Declaration
Objective-C
@property (nonatomic, strong, readonly) BPKOverlayBackgroundView *_Nonnull backgroundView;
Swift
var backgroundView: BPKOverlayBackgroundView { get }
-
Create a
BPKOverlayView
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
BPKOverlayView
instance. -
Creates a
BPKOverlayView
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
BPKOverlayView
instance. -
Creates a
BPKOverlayView
with a corner style and overlay type.Declaration
Objective-C
- (nullable instancetype) initWithOverlayType:(BPKOverlayViewOverlayType)overlayType cornerStyle:(BPKOverlayViewCornerStyle)cornerStyle;
Swift
init?(overlayType: BPKOverlayViewOverlayType, cornerStyle: BPKOverlayViewCornerStyle)
Parameters
overlayType
The overlay type to show in front of the background view.
cornerStyle
The corner style to apply to the whole view.
Return Value
BPKOverlayView
instance.