RBManagedFormItemSchema Class Reference

Inherits from NSObject
Conforms to NSCopying
Declared in RBManagedFormItemSchema.h

Overview

The base schema class for a managed form item.

  identifier

The unique identifier of this schema and the UIView that it will later create. Use this to reference fields. You should assign this if you would like to refer to a field. If you do not assign an identifier one will be assigned automatically. The identifier is also used to reference the specific theme within the parent RBManagedFormView theme.

@property (nonatomic, nonnull) NSString *identifier

Discussion

The unique identifier of this schema and the UIView that it will later create. Use this to reference fields. You should assign this if you would like to refer to a field. If you do not assign an identifier one will be assigned automatically. The identifier is also used to reference the specific theme within the parent RBManagedFormView theme.

Declared In

RBManagedFormItemSchema.h

  defaultThemeIdentifier

The identifier of the theme (in the RBManagedFormView theme) to apply to all items of this type. Override this when creating a subclass.

@property (nonatomic, readonly, nonnull) NSString *defaultThemeIdentifier

Discussion

The identifier of the theme (in the RBManagedFormView theme) to apply to all items of this type. Override this when creating a subclass.

Declared In

RBManagedFormItemSchema.h

  themeOverrides

Theme values to apply after any other prior theming has been applied.

@property (nonatomic, nullable) NSDictionary<NSString*id> *themeOverrides

Discussion

Theme values to apply after any other prior theming has been applied.

Declared In

RBManagedFormItemSchema.h

  hidden

Indicates this is a ‘hidden’ item. The UI for this field will not be displayed nor will any validation occur. If a form field is marked hidden it’s inital value will always be returned when calling the values property on the RBManagedFormView. This is useful for passing values through forms.

@property (nonatomic) BOOL hidden

Discussion

Indicates this is a ‘hidden’ item. The UI for this field will not be displayed nor will any validation occur. If a form field is marked hidden it’s inital value will always be returned when calling the values property on the RBManagedFormView. This is useful for passing values through forms.

Declared In

RBManagedFormItemSchema.h

+ canHandleSchemaDictionary:

Whether or not this type of managed form item can be deserialised from the given dictionary.

+ (BOOL)canHandleSchemaDictionary:(nonnull NSDictionary *)schemaDictionary

Parameters

schemaDictionary

The dictionary to test compatibility with.

Return Value

Whether or not it is compatible.

Discussion

Whether or not this type of managed form item can be deserialised from the given dictionary.

Declared In

RBManagedFormItemSchema.h

– initWithSchemaDictionary:

Initializes the managed form item schema with the serialised dictionary given.

- (nonnull instancetype)initWithSchemaDictionary:(nonnull NSDictionary *)schemaDictionary

Parameters

schemaDictionary

The serialised schema dictionary.

Return Value

The initialized form item schema object.

Discussion

Initializes the managed form item schema with the serialised dictionary given.

Declared In

RBManagedFormItemSchema.h

– schemaDictionary

Serialises the item schema to a dictionary.

- (nonnull NSDictionary *)schemaDictionary

Return Value

The serialised dictionary result.

Discussion

Serialises the item schema to a dictionary.

Declared In

RBManagedFormItemSchema.h

– newView

Creates a new item view from the schema details.

- (nonnull UIView *)newView

Return Value

The new item view.

Discussion

Creates a new item view from the schema details.

Declared In

RBManagedFormItemSchema.h

+ primaryTypeName

The name of this type of managed form item. This is used for serialisation.

+ (nonnull NSString *)primaryTypeName

Return Value

The managed form item name.

Discussion

The name of this type of managed form item. This is used for serialisation.

Declared In

RBManagedFormItemSchema.h

+ validTypeNames

An array of the type names that will be matched to this item during serialisation.

+ (nonnull NSArray *)validTypeNames

Return Value

The array of type names.

Discussion

An array of the type names that will be matched to this item during serialisation.

Declared In

RBManagedFormItemSchema.h

– resetToDefaults

Reset all settings to their default values.

- (void)resetToDefaults

Discussion

Reset all settings to their default values.

Declared In

RBManagedFormItemSchema.h

– populateSchemaDictionary:

Populate the schema with the values serialised in the given dictionary. This is called by schemaDictionary only, never call it directly.

- (void)populateSchemaDictionary:(nonnull NSMutableDictionary *)schemaDictionary

Parameters

schemaDictionary

The serialised schema dictionary.

Discussion

Populate the schema with the values serialised in the given dictionary. This is called by schemaDictionary only, never call it directly.

Declared In

RBManagedFormItemSchema.h

– createView

Create a new item view from the schema details. This is called by newView only, never call it directly.

- (nonnull UIView *)createView

Return Value

The new item view.

Discussion

Create a new item view from the schema details. This is called by newView only, never call it directly.

Declared In

RBManagedFormItemSchema.h