RBManagedFormView Class Reference

Inherits from UIView
Declared in RBManagedFormView.h

Overview

A view that provides a managed form.

  delegate

A delegate to receive form events.

@property (nonatomic, weak, nullable) id<RBManagedFormViewDelegate,RBBaseLayoutViewDelegate> delegate

Declared In

RBManagedFormView.h

  positioner

The RBLayoutPositioner to handle the layout of form elements. Default = RBLayoutGridPositioner with values spacing = 0, dimensions = 1, margin = [0, 0, 0, 0], orientation = RBOrientationVertical, sizing = RBLayoutGridPositionerSizeEvenly.

@property (nonatomic, nonnull) RBLayoutPositioner *positioner

Declared In

RBManagedFormView.h

  scroller

The UIScrollView to scroll and adjust when managing fields and input views. If nil, the layout view of the form itself is used. Default is nil.

@property (nonatomic, weak, nullable) UIScrollView *scroller

Declared In

RBManagedFormView.h

  modalTransitionStyle

The UIModalTransitionStyle to use when displaying any modals such as the photo picker. Default = UIModalTransitionStyleCoverVertical.

@property (nonatomic) UIModalTransitionStyle modalTransitionStyle

Declared In

RBManagedFormView.h

  accessoryToolbarView

The toolbar to be used on input views when editing form fields.

@property (nonatomic, readonly, nonnull) RBManagedFormInputToolbar *accessoryToolbarView

Declared In

RBManagedFormView.h

  toolbarEnabled

Whether or not the toolbar should be used on input views. Default = YES.

@property (nonatomic) BOOL toolbarEnabled

Declared In

RBManagedFormView.h

  keyboardReturnAction

The action to perform when the return key is tapped on the keyboard.

@property (nonatomic) RBManagedFormKeyboardReturnAction keyboardReturnAction

Declared In

RBManagedFormView.h

  validationViewType

The validation view to display when highlighting incomplete fields. Default = RBManagedFormValidationViewTypeTooltip.

@property (nonatomic) RBManagedFormValidationViewType validationViewType

Declared In

RBManagedFormView.h

– resetForm

Resets the form to empty.

- (void)resetForm

Declared In

RBManagedFormView.h

– setFormSchema:

Updates the form using the given schema.

- (void)setFormSchema:(nonnull RBManagedFormSchema *)formSchema

Parameters

formSchema

The RBManagedFormSchema object.

Declared In

RBManagedFormView.h

– itemSchemaForIdentifier:

Retrieves the item schema for the given identifier.

- (nullable RBManagedFormItemSchema *)itemSchemaForIdentifier:(nonnull NSString *)identifier

Parameters

identifier

The identifer of the schema item object.

Return Value

The RBManagedFormItemSchema object.

Declared In

RBManagedFormView.h

– viewForIdentifier:

Returns the UIView that was created for the schema item matching the given identifier.

- (nullable UIView *)viewForIdentifier:(nonnull NSString *)identifier

Parameters

identifier

The identifier of the schema item object.

Return Value

The UIView for the given identifier.

Declared In

RBManagedFormView.h

  values

The current value of the form fields. If hidden form fields are present the initial values of these fields will be included returned when calling this property. Note setting hidden form fields using this property has no effect.

@property (nonatomic, nonnull) NSDictionary<NSString*id> *values

Declared In

RBManagedFormView.h

– resetToInitialValues

Resets the form fields to the initial values specified in the schema.

- (void)resetToInitialValues

Declared In

RBManagedFormView.h

– updateValuesWithDictionary:

Updates the current value of the (non hidden) form fields with the given values dictionary.

- (void)updateValuesWithDictionary:(nonnull NSDictionary<NSString*,id> *)keyedValues

Parameters

keyedValues

The NSDictionary<NSString *, id> object containing field values.

Declared In

RBManagedFormView.h

– selectFirstField

Opens the keyboard/inputview on the first editable field.

- (void)selectFirstField

Declared In

RBManagedFormView.h

– selectFieldWithIdentifier:

Opens the keyboard/inputview on the editable field with the given identifier.

- (void)selectFieldWithIdentifier:(nonnull NSString *)identifier

Parameters

identifier

The name of the field to select for editing.

Declared In

RBManagedFormView.h

– closeKeyboardWithCompletion:

Close the open keyboard/inputview.

- (void)closeKeyboardWithCompletion:(nullable dispatch_block_t)completion

Parameters

completion

An optional block to be called when the keyboard has been closed.

Declared In

RBManagedFormView.h

– validateFieldWithIdentifier:

Runs validation for the field with the given identifier.

- (BOOL)validateFieldWithIdentifier:(nonnull NSString *)identifier

Parameters

identifier

The field identifier.

Return Value

Whether or not the field validated.

Declared In

RBManagedFormView.h

– validateForm

Runs validation on the form, returning the result.

- (BOOL)validateForm

Return Value

Whether or not the form is valid.

Declared In

RBManagedFormView.h

– submitForm

Submits the form, prompting validation and delegate calls if successful.

- (BOOL)submitForm

Return Value

Whether or not the form validated and was submitted.

Declared In

RBManagedFormView.h

– cancelForm

Cancels the form, calling the delegate method.

- (void)cancelForm

Declared In

RBManagedFormView.h