RSDInstructionStepViewController

open class RSDInstructionStepViewController : RSDPermissionStepViewController

RSDInstructionStepViewController is a custom step view controller that is intended to be used with the RSDInstructionStepViewController.nib file. This is the default view controller for steps that

  • Retuns the imageView, in this case the image from the navigationHeader.

    Declaration

    Swift

    open var imageView: UIImageView? { get }
  • Override viewDidLayoutSubviews to set up resizing the image to balance the the space provided to the image verse the space provided for the text.

    Declaration

    Swift

    open override func viewDidLayoutSubviews()
  • Override viewWillAppear to update image placement constraints.

    Declaration

    Swift

    override open func viewWillAppear(_ animated: Bool)
  • Sets the height of the scrollview’s top background view depending on the image placement type from this step. Default behavior is to constrain the scrollview to be under the status bar if the placement type is .topMarginBackground.

    Declaration

    Swift

    open func updateImagePlacementConstraintsIfNeeded()
  • If the learn more button is hidden, then the constraints for it should be deactivated.

    Declaration

    Swift

    open func updateLearnMoreContraints()
  • Update the image height constraint to balance the the space provided to the image versus the space provided for the text. The default is to look at the overall screen height and size the image to take up half the space if the text does not fit (iPhone SE) or resize to take the remaining space if the image is for a longer screen (iPhone X).

    Declaration

    Swift

    open func updateImageHeightConstraintIfNeeded()
  • Declaration

    Swift

    override open func setColorStyle(for placement: RSDColorPlacement, background: RSDColorTile)
  • Static method to determine if this view controller class supports the provided step.

    Only UI Themed steps with an image that is top-background are supported. Additionally, if there are form items that need to be displayed then this view controller is not appropriate.

    Note

    support for elements such as a footnote, detail, learn more, etc. require using a custom implementation for the nib or storyboard.

    Declaration

    Swift

    open class func doesSupport(_ step: RSDStep) -> Bool
  • The default nib name to use when instantiating the view controller using init(step:).

    Declaration

    Swift

    open class var nibName: String { get }
  • The default bundle to use when instantiating the view controller using init(step:).

    Declaration

    Swift

    open class var bundle: Bundle { get }
  • Default initializer. This initializer will initialize using the nibName and bundle defined on this class.

    Declaration

    Swift

    public override init(step: RSDStep, parent: RSDPathComponent?)

    Parameters

    step

    The step to set for this view controller.

  • Initialize the class using the given nib and bundle.

    Note

    If this initializer is used with a nil nib, then it must assign the expected outlets.

    Declaration

    Swift

    public override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?)

    Parameters

    nibNameOrNil

    The name of the nib or nil.

    nibBundleOrNil

    The name of the bundle or nil.

  • Required initializer. This is the initializer used by a UIStoryboard.

    Declaration

    Swift

    public required init?(coder aDecoder: NSCoder)

    Parameters

    aDecoder

    The decoder used to initialize this view controller.