Inherits from UIView
Declared in TKDataForm.h

Overview

TKDataForm is a component that allows you to easily edit a business object’s properties.

Properties

allowScroll

Determines if scrolling is enabled.

@property (nonatomic) BOOL allowScroll

Declared In

TKDataForm.h

commitMode

TKDataForm’s commit mode. It determines when the data the user has just entered will be reflected on the underlying business object.

@property (nonatomic) TKDataFormCommitMode commitMode

Declared In

TKDataForm.h

dataSource

TKDataForm’s data source.

@property (nonatomic, weak, nullable) id<TKDataFormDataSource> dataSource

Declared In

TKDataForm.h

delegate

TKDataForm’s delegate.

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

Declared In

TKDataForm.h

groupSpacing

The spacing betweent groups in TKDataForm

@property (nonatomic) CGFloat groupSpacing

Declared In

TKDataForm.h

owner

The UIViewController that contains this form.

@property (nonatomic, weak, nullable) UIViewController *owner

Declared In

TKDataForm.h

readOnly

Determines if the data form can be edited.

@property (nonatomic) BOOL readOnly

Declared In

TKDataForm.h

validationMode

TKDataForm’s validation mode.

@property (nonatomic) TKDataFormValidationMode validationMode

Declared In

TKDataForm.h

Instance Methods

commit

Commits the data entered in TKDataForm. This method takes effect only when commit mode is TKDataFormCommitModeManual.

- (void)commit

Declared In

TKDataForm.h

commitForced

Commits the data entered in TKDataForm immediattely without attmepting validation.

- (void)commitForced

Declared In

TKDataForm.h

editorValueChanged:

Notify the data form that an editor has changed its value.

- (void)editorValueChanged:(TKDataFormEditor *__nonnull)editor

Parameters

editor

The editor which value has changed.

Declared In

TKDataForm.h

groupViewForGroup:

Gets the group view for the corresponding group.

- (TKEntityPropertyGroupView *__nullable)groupViewForGroup:(TKEntityPropertyGroup *__nonnull)group

Parameters

group

The group whose view will be returned.

Declared In

TKDataForm.h

hasValidationErrors

Checks the ‘validation’ state of the TKDataForm.

- (bool)hasValidationErrors

Return Value

Returns true if any of the TKDataForm editors validation is not valid.

Declared In

TKDataForm.h

initWithJSONAnnotationsResource:ofType:

Creates new instance of TKDataForm using JSON annotations.

- (instancetype __nonnull)initWithJSONAnnotationsResource:(NSString *__nonnull)resourceName ofType:(NSString *__nonnull)type

Parameters

resourceName

Path to JSON annotations.

type

The type of the resource

Return Value

New instace of TKDataForm.

Declared In

TKDataForm.h

registerEditor:forProperty:

Registers an editor class for a specified property. This method has highest priority among the other two register methods (for type and for class).

- (void)registerEditor:(Class __nonnull)editorClass forProperty:(NSString *__nonnull)propertyName

Parameters

editorClass

The class of the editor that will be used.

propertyName

The property for which the editor class will be used.

Declared In

TKDataForm.h

registerEditor:forPropertyOfClass:

Registers an editor of a specified class for a property of a specified class.

- (void)registerEditor:(Class __nonnull)editorClass forPropertyOfClass:(Class __nonnull)propertyClass

Parameters

editorClass

The class of the editor that will be used.

propertyClass

The property class for which the editor class will be used.

Declared In

TKDataForm.h

registerEditor:forPropertyOfType:

Registers an editor class for a property type.

- (void)registerEditor:(Class __nonnull)editorClass forPropertyOfType:(TKEntityPropertyType)propertyType

Parameters

editorClass

The class of the editor that will be used.

propertyType

The type of the properties that will be registered.

Declared In

TKDataForm.h

reloadData

Reloads TKDataForm.

- (void)reloadData

Declared In

TKDataForm.h

setEditorOnFocus:

Sets an edior on focus. Use this method in TKDataFormEditor subclasses.

- (void)setEditorOnFocus:(TKDataFormEditor *__nullable)editor

Parameters

editor

The editor that will be set on fucus.

Declared In

TKDataForm.h

setupWithJSONAnnotationsString:

Setups TKDataForm using JSON annotations.

- (void)setupWithJSONAnnotationsString:(NSString *__nonnull)str

Parameters

str

The string with JSON annotations.

Declared In

TKDataForm.h

update

Updates the visual appearance of all editors in TKDataForm.

- (void)update

Declared In

TKDataForm.h

updateEditorForProperty:

Updates only the editor for the corresponding property.

- (void)updateEditorForProperty:(TKEntityProperty *__nonnull)property

Parameters

property

The property which editor will be updated.

Declared In

TKDataForm.h

validate

Validates the data entered in TKDataForm.

- (void)validate

Declared In

TKDataForm.h