TKDataForm Class Reference
Inherits from | UIView |
Declared in | TKDataForm.h |
Tasks
-
dataSource
property -
owner
property -
delegate
property -
commitMode
property -
validationMode
property -
groupSpacing
property -
allowScroll
property -
readOnly
property -
– initWithJSONAnnotationsResource:ofType:
-
– setupWithJSONAnnotationsString:
-
– validate
-
– commit
-
– commitForced
-
– hasValidationErrors
-
– registerEditor:forProperty:
-
– registerEditor:forPropertyOfClass:
-
– registerEditor:forPropertyOfType:
-
– setEditorOnFocus:
-
– editorValueChanged:
-
– reloadData
-
– updateEditorForProperty:
-
– update
-
– groupViewForGroup:
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
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
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