Index

RBFormAlertSchema.swift

Classes


RBFormAlertSchema

A schema to describe a managed form alert. Corresponds to setting up a RBFormAlertViewController.

Properties

The submit button identifier for a form alert. You may use this in the setButtons: method. Using this value will provide a button that will submit the form when pressed. The value of this is = 'cancelButton'
static public let cancelButtonIdentifier String { get set }

The cancel button identifier for a form alert. You may use this in the setButtons: method. Using this value will provide a button that will cancel the form when pressed. The value of this is = 'submitButton'
static public let submitButtonIdentifier String { get set }

The schema of the managed form that will be presented.
public var formSchema RBFormSchema? { get set }

The titles of the buttons on the form alert.
public var buttonTitles [String] { get }

The identifiers of the buttons on the form alert.
public var buttonIdentifiers [String] { get }

Whether or not the alignment specified in this schema should be used rather than the default value on the presenting view controller. Default = NO.
public var shouldUseSchemaAlignment Bool { get set }

The vertical alignment to use when positioning the form alert view.
public var alignment RBVerticalAlignment { get set }

Whether or not the margin specified by this schema should be used rather than the default value on the presenting view controller.
public var shouldUseSchemaMargin Bool { get set }

The margin to use around the outside of the form alert view when positioning it within the presenting view controller.
public var margin UIEdgeInsets { get set }

The animator to use when animating the presentation and dismissal transitions.
public var animator RBPresentationAnimator? { get set }

Whether or not the first editable field should be automatically selected (opening the input view) when the form alert is opening. Default = NO.
public var shouldOpenFirstFieldForEditing Bool { get set }

The identifier of the theme to apply to the managed alert form prior to presenting it.
public var themeIdentifier String? { get set }

Theme values to apply after any other prior theming has been applied.
public var themeOverrides [String: Any]? { get set }

Functions

Defines the buttons that will be provided. By default a functioning submit and cancel button are provided.
@param identifiers : The unique identifier for each button. Note you may use the pre-defined identifier constants in RBFormAlertViewController i.e. submitButtonIdentifier -> 'submitButton' and cancelButtonIdentifier -> 'cancelButton' to easily add submit and cancel buttons that call the submitForm and cancelFrom methods on the managed form.
@param titles : The buttons titles.
public func setButtons(_ identifiers: [String], withTitles titles: [String])