Index

RBFormSchema.swift

Enumerations

Classes


RBFormSchema

A managed form schema.

Properties

The identifier of the theme to apply to the form prior to presenting it. When the schema is applied to a form this property has the effect of setting the managed forms theme identifier i.e. 'managedForm.theme.identifier = themeIdentifier'.
public var themeIdentifier String? { get set }

Theme values to apply after any other prior theming has been applied. When the schema is applied to a form this property has the effect of applying the theme overrides to the forms theme.
public var themeOverrides [String: Any]? { get set }

The initial form values.
public var initialValues [String: Any] { get }

An array of the views for the form. The views are obtained via the given schema items.
public var views [UIView] { get }

The UIModalTransitionStyle to use when displaying any modals such as the photo picker. Default = UIModalTransitionStyleCoverVertical.
public var modalTransitionStyle UIModalTransitionStyle { get set }

Whether or not the toolbar should be used on input views. Default = YES.
public var toolbarEnabled Bool { get set }

The validation view to display when highlighting incomplete fields. Default = RBFormValidationViewTypeTooltip.
public var validationViewType RBFormValidationViewType { get set }

Whether or not fields in the form should perform validation checks serially and stop on the first invalid field when a form is submitted or to perform validation on all fields at the same time. Default = false.
public var validateSeriallyOnSubmit Bool { get set }

Whether or not fields should validate when it's value is modified. Default = false.
public var validateFieldsOnChange Bool { get set }

The action to perform when the return key is tapped on the keyboard. Default = RBFormKeyboardReturnActionCloseKeyboard.
public var keyboardReturnAction RBFormKeyboardReturnAction { get set }

An array of form item schema objects.
public var items [RBFormItemSchema] { get }

Functions

Creates a new form validator from the schema.
@returns A new RBFormValidator object.
public func newValidator() -> RBFormValidator

Gets the item schema with the given name.
@param identifier : The name of the item.
@returns The retrieved item schema object.
public func item(_ identifier: String) -> RBFormItemSchema?

Gets the form field schema with the given name.
@param identifier : The identifier of the field.
@returns The retrieved form field schema object.
public func field(_ identifier: String) -> RBFormFieldSchema?

Gets the schema for the given view.
@param view : The view of the schema.
@returns The retrieved item schema object.
public func view(_ view: UIView) -> RBFormItemSchema?

public class func createItem<T : UIView>(_ type: T.Type, completion: ((_ itemSchema: RBFormItemSchema, _ view: T) -> Void)) -> RBFormItemSchema

public class func createItem<T : UIView>(_ type: T.Type) -> RBFormItemSchema

public class func createField<T : UIView>(_ type: T.Type, completion: ((_ fieldSchema: RBFormFieldSchema, _ view: T) -> Void)) -> RBFormFieldSchema

public class func createField<T : UIView>(_ type: T.Type) -> RBFormFieldSchema

public class func createCancelButton(completion: ((_ cancelButtonSchema: RBFormCancelButtonSchema, _ view: RBButton) -> Void)) -> RBFormItemSchema

public class func createSubmitButton(completion: ((_ cancelButtonSchema: RBFormSubmitButtonSchema, _ view: RBButton) -> Void)) -> RBFormItemSchema