RSDViewDesignable

public protocol RSDViewDesignable : AnyObject

A protocol that UIView subclasses can use to standardize the color of their view properties.

  • The background color mapping that this view should use as its key. Typically, for all but the top-level views, this will be the background of the superview.

    Declaration

    Swift

    var backgroundColorTile: RSDColorTile? { get }
  • The design system for this component.

    Declaration

    Swift

    var designSystem: RSDDesignSystem? { get }
  • All views will have a superview property.

    Declaration

    Swift

    var superview: UIView? { get }
  • Views can be used in nibs and storyboards without setting up a design system for them. This allows for setting up views to use the same design system and background color mapping as their parent view.

    Declaration

    Swift

    func setDesignSystem(_ designSystem: RSDDesignSystem, with background: RSDColorTile)

    Parameters

    designSystem

    The design system that is used to set up this view.

    background

    The background tile for this view.