Classes

The following classes are available globally.

  • BPKAppearance contains helpers for applying default brand appearance to UI components.

    See more

    Declaration

    Objective-C

    @interface BPKAppearance : NSObject

    Swift

    class BPKAppearance : NSObject
  • BPKBadge is a subclass of UIView which contains the Skyscanner badge style.

    See more

    Declaration

    Objective-C

    @interface BPKBadge : UIView

    Swift

    class BPKBadge : UIView
  • BPKButton is a subclass of UIButton configured with Skyscanner style properties.

    See more

    Declaration

    Objective-C

    @interface BPKButton : UIButton

    Swift

    class BPKButton : UIButton
  • BPKCalendar is a subclass of FSCalendar configured with Skyscanner style properties.

    See more

    Declaration

    Objective-C

    @interface BPKCalendar : UIView

    Swift

    class BPKCalendar
  • BPKCalendarColor contains a number of pre-defined colours commonly used when presenting a calendar.

    See more

    Declaration

    Objective-C

    @interface BPKCalendarColor : NSObject

    Swift

    class BPKCalendarColor
  • BPKCalendarConfiguration is a subclass of NSObject containing properties which the calendar will use when rendering.

    See more

    Declaration

    Objective-C

    @interface BPKCalendarConfiguration : NSObject

    Swift

    class BPKCalendarConfiguration
  • BPKCalendarPriceLabelCell is a subclass of BPKCalendarCell. It allows a custom label containing auxillary price information to be shown below the cell.

    See more

    Declaration

    Objective-C

    @interface BPKCalendarPriceLabelCell : BPKCalendarCell

    Swift

    class BPKCalendarPriceLabelCell : BPKCalendarCell
  • BPKCalendarPriceLabelCellData contains the properties required to show a price label under a calendar cell.

    See more

    Declaration

    Objective-C

    @interface BPKCalendarPriceLabelCellData : NSObject

    Swift

    class BPKCalendarPriceLabelCellData
  • BPKCalendarPriceLabelCellData contains the properties required to customise a calendar cell under a traffic-light system to colour cells according to data.

    See more

    Declaration

    Objective-C

    @interface BPKCalendarPriceLabelStyle : NSObject

    Swift

    class BPKCalendarPriceLabelStyle
  • BPKCalendarTrafficLightCell is a subclass of BPKCalendarCell. It allows customisation of the cell fill colour and title colour.

    Declaration

    Objective-C

    @interface BPKCalendarTrafficLightCell : BPKCalendarCell

    Swift

    class BPKCalendarTrafficLightCell : BPKCalendarCell
  • BPKCalendarTrafficLightCellData contains the properties required to customise a calendar cell under a traffic-light system to colour cells according to data.

    See more

    Declaration

    Objective-C

    @interface BPKCalendarTrafficLightCellData : NSObject

    Swift

    class BPKCalendarTrafficLightCellData
  • 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.

    See more

    Declaration

    Objective-C

    @interface BPKCard : UIControl

    Swift

    class BPKCard : UIControl
  • BPKCardDivider is a subclass of UIView which contains the Skyscanner card divider style.

    See more

    Declaration

    Objective-C

    @interface BPKCardDivider : UIView

    Swift

    class BPKCardDivider : UIView
  • BPKDividedCard is a subclass of BPKCard which contains the Skyscanner divided card style. Divided cards are a lightweight containers with a subtle shadow and two subviews. Divided cards, like Cards, can be configured to have padding or not.

    See more

    Declaration

    Objective-C

    @interface BPKDividedCard : BPKCard

    Swift

    class BPKDividedCard : BPKCard
  • BPKChip is a subclass of UIControl configured with Skyscanner style properties.

    See more

    Declaration

    Objective-C

    @interface BPKChip : UIControl

    Swift

    class BPKChip : UIControl
  • BPKColor is the entry point for the Backpack color palette. It expose the whole palette as static methods.

    See more

    Declaration

    Objective-C

    @interface BPKColor : NSObject

    Swift

    class BPKColor : NSObject
  • An object describing individual button actions in a BPKDialogController or BPKDialogView. Each action has an associated handler to invoke when the button is tapped or otherwise triggered.

    See more

    Declaration

    Objective-C

    @interface BPKDialogButtonAction : NSObject

    Swift

    class BPKDialogButtonAction : NSObject
  • A UIViewController subclass encapsulating the Backpack dialog component. The controller is preconfigured to use itself as the transitioningDelegate consumers should not change this as it breaks the custom transition support. The dialog always contains a title and message as-well as zero or more action buttons. The scrim display behind the content view can be configured to dismiss the view controller where appropriate.

    The controller is exclusively intended to be used with presentViewController:.

    See more

    Declaration

    Objective-C

    @interface BPKDialogController
        : UIViewController <BPKDialogViewDelegate,
                            UIViewControllerTransitioningDelegate>

    Swift

    class BPKDialogController : UIViewController, BPKDialogViewDelegate, UIViewControllerTransitioningDelegate
  • An object that represents the icon displayed atop a dialog.

    See more

    Declaration

    Objective-C

    @interface BPKDialogIconDefinition : NSObject

    Swift

    class BPKDialogIconDefinition : NSObject
  • An object describing the action to take when the scrim of a BPKDialogController is tapped by the user.

    See more

    Declaration

    Objective-C

    @interface BPKDialogScrimAction : NSObject

    Swift

    class BPKDialogScrimAction : NSObject
  • A UIView subclass that renders the Backpack Dialog. Used by BPKDialogController, but can also be used directly in rare cases.

    See

    BPKDialogController
    See more

    Declaration

    Objective-C

    @interface BPKDialogView : UIView <UIGestureRecognizerDelegate>

    Swift

    class BPKDialogView : UIView, UIGestureRecognizerDelegate
  • BPKDuration is the entry point for the Backpack animation durations. It exposes all the durations as static methods.

    See more

    Declaration

    Objective-C

    @interface BPKDuration : NSObject

    Swift

    class BPKDuration : NSObject
  • A BPKFlareView is a subclass of UIView

    See more

    Declaration

    Objective-C

    @interface BPKFlareView : UIView

    Swift

    class BPKFlareView : UIView
  • BPKFont is the entry point for the Backpack typography stack. It expose the supported text styles as static methods.

    See more

    Declaration

    Objective-C

    @interface BPKFont : NSObject

    Swift

    class BPKFont : NSObject
  • The BPKGradient class contains definitions for the Backpack gradients. It has factory methods for creating instances of supported gradients. Instances of BPKGradient capture the configuration of the gradient, but are not concerned with rendering.

    Warning

    Don’t render Backpack gradients with CAGradientLayer as it does not accurately render gradients for non-square views. Instead use BPKGradientView which is backed by BPKGradientLayer.

    See

    BPKGradientView

    See more

    Declaration

    Objective-C

    @interface BPKGradient : NSObject

    Swift

    class BPKGradient : NSObject
  • BPKGradientLayer is a CALayer subclass that can correctly render Backpack gradients for non-square views. It should be preferred in favour of CAGradientLayer as it does not correctly render gradients for non-square views.

    See more

    Declaration

    Objective-C

    @interface BPKGradientLayer : CALayer

    Swift

    class BPKGradientLayer : CALayer
  • This class is a UIView subclass for correctly drawing non-square gradients. It’s backed by a layer that does the actual drawing, but using this view directly is preferred.

    Changing the bounds or updating the gradient property causes this view to redraw on the next display pass.

    See more

    Declaration

    Objective-C

    @interface BPKGradientView : UIView

    Swift

    class BPKGradientView : UIView
  • This class is a UIView subclass that draws the primary gradient. It’s backed by a layer that does the actual drawing, but using this view directly is preferred.

    See more

    Declaration

    Objective-C

    @interface BPKPrimaryGradientView : UIView

    Swift

    class BPKPrimaryGradientView : UIView
  • A BPKHorizontalNavigation is a control comprising of multiple segments, where each acts as a discrete button.

    See more

    Declaration

    Objective-C

    @interface BPKHorizontalNavigation : UIControl

    Swift

    class BPKHorizontalNavigation : UIControl
  • A single option within a horizontal navigation.

    Can be configured to show an optional icon, always includes a name.

    See more

    Declaration

    Objective-C

    @interface BPKHorizontalNavigationOption
        : NSObject <BPKHorizontalNavigationOptionType>

    Swift

    class BPKHorizontalNavigationOption : NSObject, BPKHorizontalNavigationOptionType
  • This class encapsulates all Backpack icons and the ability to render them as UIImage. It leverages a NSCache to prevent excessive performance impact when using the same icon many times. Further the use of NSCache means that in low memory scenarios the cache will be cleared to allow more important memory use.

    See more

    Declaration

    Objective-C

    @interface BPKIcon : NSObject

    Swift

    class BPKIcon : NSObject
  • A UIImageView subclass that makes working with Backpack icons easier for cases where a single icon is used and colour is controlled via tintColor. The icon is always rendered using template rendering.

    See more

    Declaration

    Objective-C

    @interface BPKIconView : UIImageView

    Swift

    class BPKIconView : UIImageView
  • BPKLabel is a subclass of UILabel which uses the Skyscanner style.

    See more

    Declaration

    Objective-C

    @interface BPKLabel : UILabel

    Swift

    class BPKLabel
  • A navigation bar component similar to UINavigationBar from UIKit implementing the iOS 11 style large title pattern.

    See more

    Declaration

    Objective-C

    @interface BPKNavigationBar : UIView

    Swift

    class BPKNavigationBar : UIView
  • BPKOverlayBackgroundView is a subclass of UIView which allows you to apply Skyscanner style tints to its content.

    See more

    Declaration

    Objective-C

    @interface BPKOverlayBackgroundView : UIView

    Swift

    class BPKOverlayBackgroundView : UIView
  • BPKOverlayView is a subclass of UIView which allows you to apply Skyscanner style tints to background content.

    See more

    Declaration

    Objective-C

    @interface BPKOverlayView : UIView

    Swift

    class BPKOverlayView : UIView
  • BPKPanel is a subclass of UIView which contains the Skyscanner panel style. Panels are a lightweight container with a subtle shadow. Panels can be configured to have padding or not.

    See more

    Declaration

    Objective-C

    @interface BPKPanel : UIView

    Swift

    class BPKPanel : UIView
  • BPKProgressBar is a lightweight subclass of UIProgressView with Skyscanner styling applied.

    See more

    Declaration

    Objective-C

    @interface BPKProgressBar : UIProgressView

    Swift

    class BPKProgressBar : UIProgressView
  • BPKRating is a subclass of UIView configured with Skyscanner style properties.

    See more

    Declaration

    Objective-C

    @interface BPKRating : UIView

    Swift

    class BPKRating : UIView
  • An object that represents the text displayed inside the rating component.

    See more

    Declaration

    Objective-C

    @interface BPKRatingTextDefinition : NSObject

    Swift

    class BPKRatingTextDefinition : NSObject
  • The BPKShadow class contains definitions for Backpack shaddows. It has factory methods for creating instances of supported shaddows.

    See more

    Declaration

    Objective-C

    @interface BPKShadow : NSObject

    Swift

    class BPKShadow : NSObject
  • A snackbar is a piece of UI displayed at the bottom edge of the window which is useful to show notifications and other feedback on actions the user has just taken.

    Users can also take contextual actions for example undoing the change that caused the snackbar to be displayed.

    See more

    Declaration

    Objective-C

    @interface BPKSnackbar : UIView

    Swift

    class BPKSnackbar : UIView
  • Describes the button to show in a snackbar.

    See more

    Declaration

    Objective-C

    @interface BPKSnackbarButton : NSObject

    Swift

    class BPKSnackbarButton : NSObject
  • BPKSpinner is a subclass of UIActivityIndicatorView configured with Skyscanner style properties.

    See more

    Declaration

    Objective-C

    @interface BPKSpinner : UIActivityIndicatorView

    Swift

    class BPKSpinner : UIActivityIndicatorView
  • A component for displaying a star rating for example for reviews.

    The component uses a scale of 0 to 5 stars. It supports half stars and will round down to the nearest half star for display. When using the stars to show an average of many ratings it’s advisable to display a text string adjecent to the star rating with the exact rating value.

    See more

    Declaration

    Objective-C

    @interface BPKStarRating : UIView

    Swift

    class BPKStarRating : UIView
  • BPKSwitch is a subclass of UISwitch configured with Skyscanner style properties.

    See more

    Declaration

    Objective-C

    @interface BPKSwitch : UISwitch

    Swift

    class BPKSwitch : UISwitch
  • BPKTabBarController is a subclass of UITabBarController configured with Skyscanner style properties.

    Declaration

    Objective-C

    @interface BPKTabBarController : UITabBarController

    Swift

    class BPKTabBarController : UITabBarController
  • BPKTappableLinkLabel is a subclass of UIView which uses the Skyscanner style for labels containing tappable text.

    See more

    Declaration

    Objective-C

    @interface BPKTappableLinkLabel : UIView

    Swift

    class BPKTappableLinkLabel : UIView
  • BPKTextField is a subclass of UITextField which uses the Skyscanner style.

    See more

    Declaration

    Objective-C

    @interface BPKTextField : UITextField

    Swift

    class BPKTextField
  • BPKTextView is a subclass of UITextView which uses the Skyscanner style.

    See more

    Declaration

    Objective-C

    @interface BPKTextView : UITextView

    Swift

    class BPKTextView
  • A view controller that manages wrapping a view hierarchy in a view. The view controller hierarchy and thus view hierarchy contained in the controller is conditionally rendered inside a container. By leveraging the container relationship consumers can use UIAppearance to alter the look of all views rendered within the container.

    See more

    Declaration

    Objective-C

    @interface BPKContainerController : UIViewController

    Swift

    class BPKContainerController : UIViewController
  • A subclass of BPKContainerController which manages the application of a theme.

    The view controller hierarchy and thus view hierarchy contained in the controller is conditionally rendered inside a container. By leveraging the container relationship consumers can use UIAppearance to alter the look of all views rendered within the container.

    See more

    Declaration

    Objective-C

    @interface BPKThemeContainerController : BPKContainerController

    Swift

    class BPKThemeContainerController : BPKContainerController
  • BPKToast is a subclass of UIView configured with Skyscanner style properties.

    See more

    Declaration

    Objective-C

    @interface BPKToast : UIView

    Swift

    class BPKToast : UIView