Index

RBFormAlertViewController.swift

Classes


RBFormAlertViewController

A managed form alert view controller. Used by UIViewController+FormAlert.h.

Properties

A delegate to receive form events such as submission and button taps.
public weak var delegate RBFormAlertViewControllerDelegate? { get set }

The underlying form schema.
public var formSchema RBFormSchema? { get set }

The current form values.
public var formValues [String: Any] { 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 first editable field should be selected when the form opens.
public var shouldOpenFirstFieldForEditing Bool { get set }

The RBPositioner to handle the layout of form elements. Default = See positioner on RBFormView for default. You may theme this positioner.
public var formPositioner RBPositioner { get set }

The overall layout positioner used. You may theme this positioner. Default values = spacing = 10, dimensions = 1, margin = [10, 10, 10, 10], orientation = RBOrientationVertical, sizing = RBGridPositionerSizeEvenly.
public var positioner RBGridPositioner { get }

The layout positioner used for the buttons. You may theme this positioner. Default values = spacing = 10, dimensions = 1, margin = [0, 0, 0, 0], orientation = RBOrientationVertical, sizing = RBGridPositionerSizeEvenly.
public var buttonPositioner RBGridPositioner { get }

Functions

The size required to present the form in the given available container size.
@param containerSize : The available container size.
@returns The size required to present the form.
open func size(withContainerSize containerSize: CGSize) -> CGSize

Defines the buttons that will be provided.
@param identifiers : The unique identifier for each button. Note you may use the pre-defined identifier constants formAlertSubmitButtonIdentifier and formAlertCancelButtonIdentifier to easily add submit and cancel buttons that call the submitForm and cancelFrom methods on the managed form.
@param titles : The buttons titles.
open func setButtons(_ identifiers: [String], withTitles titles: [String])

public func formViewPresentingViewController(formView: RBFormView) -> UIViewController

public func formViewSetupView(formView: RBFormView, identifier: String, view: UIView)

public func formViewField(formView: RBFormView, identifier: String, willUpdateFromValue value: Any?, toValue newValue: Any?)

public func formViewField(formView: RBFormView, identifier: String, didUpdateFromValue previousValue: Any?, toValue value: Any?)

public func formViewSubmitted(formView: RBFormView)

public func formViewCancelled(_ formView: RBFormView)

public class func defaultPositioner() -> RBPositioner

public class func defaultButtonPositioner() -> RBPositioner