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

Discussion

A delegate to receive form events.

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 = RBLayoutGridPositionerSizingToExpand.

@property (nonatomic, nonnull) RBLayoutPositioner *positioner

Discussion

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 = RBLayoutGridPositionerSizingToExpand.

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

Discussion

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.

Declared In

RBManagedFormView.h

  modalTransitionStyle

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

@property (nonatomic) UIModalTransitionStyle modalTransitionStyle

Discussion

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

Declared In

RBManagedFormView.h

  accessoryToolbarView

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

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

Discussion

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

Declared In

RBManagedFormView.h

  toolbarEnabled

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

@property (nonatomic) BOOL toolbarEnabled

Discussion

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

Declared In

RBManagedFormView.h

  keyboardReturnAction

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

@property (nonatomic) RBManagedFormKeyboardReturnAction keyboardReturnAction

Discussion

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

Declared In

RBManagedFormView.h

  validationViewType

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

@property (nonatomic) RBManagedFormValidationViewType validationViewType

Discussion

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

Declared In

RBManagedFormView.h

– resetForm

Resets the form to empty.

- (void)resetForm

Discussion

Resets the form to empty.

Declared In

RBManagedFormView.h

– setFormSchema:

Updates the form using the given schema.

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

Parameters

formSchema

The RBManagedFormSchema object.

Discussion

Updates the form using the given schema.

Declared In

RBManagedFormView.h

– formSchemaCopy

Retrieves a copy of the form schema currently being used.

- (nonnull RBManagedFormSchema *)formSchemaCopy

Return Value

The RBManagedFormSchema object.

Discussion

Retrieves a copy of the form schema currently being used.

Declared In

RBManagedFormView.h

– itemSchemaCopyForIdentifier:

Retrieves a copy of the item schema for the given identifier.

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

Parameters

identifier

The identifer of the schema item object.

Return Value

The RBManagedFormItemSchema object.

Discussion

Retrieves a copy of the item schema for the given identifier.

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.

Discussion

Returns the UIView that was created for the schema item matching 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

Discussion

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.

Declared In

RBManagedFormView.h

– resetToInitialValues

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

- (void)resetToInitialValues

Discussion

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

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.

Discussion

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

Declared In

RBManagedFormView.h

– selectFirstField

Opens the keyboard/inputview on the first editable field.

- (void)selectFirstField

Discussion

Opens the keyboard/inputview on the first editable field.

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.

Discussion

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

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.

Discussion

Close the open keyboard/inputview.

Declared In

RBManagedFormView.h

– validateForm

Runs validation on the form, returning the result.

- (BOOL)validateForm

Return Value

Whether or not the form is valid.

Discussion

Runs validation on the form, returning the result.

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.

Discussion

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

Declared In

RBManagedFormView.h

– cancelForm

Cancels the form, calling the delegate method.

- (void)cancelForm

Discussion

Cancels the form, calling the delegate method.

Declared In

RBManagedFormView.h