SCPropertyDefinition
@interface SCPropertyDefinition : NSObject {
SCDataDefinition *ownerDataStuctureDefinition;
SCDataType dataType;
BOOL dataReadOnly;
NSString *name;
NSString *title;
SCPropertyType type;
SCPropertyAttributes *attributes;
SCPropertyType editingModeType;
SCPropertyAttributes *editingModeAttributes;
BOOL required;
BOOL autoValidate;
BOOL existsInNormalMode;
BOOL existsInEditingMode;
BOOL existsInCreationMode;
BOOL existsInDetailMode;
}
This class functions as a property definition for SCDataDefinition.
Every property definition should set a property type that determines which user interface element should be generated for the property. In addition, the generated user interface element can be further customized using the property’s attributes.
See
SCPropertyType, SCPropertyAttributes, SCClassDefinition, SCEntityDefinition, SCDictionaryDefinition.-
Unavailable
Undocumented
Declaration
Objective-C
__weak SCDataDefinition *ownerDataStuctureDefinition
-
Undocumented
Declaration
Objective-C
SCDataType dataType
-
Undocumented
Declaration
Objective-C
BOOL dataReadOnly
-
Undocumented
Declaration
Objective-C
NSString *name
-
Undocumented
Declaration
Objective-C
NSString *title
-
Undocumented
Declaration
Objective-C
SCPropertyType type
-
Undocumented
Declaration
Objective-C
SCPropertyAttributes *attributes
-
Undocumented
Declaration
Objective-C
SCPropertyType editingModeType
-
Undocumented
Declaration
Objective-C
SCPropertyAttributes *editingModeAttributes
-
Undocumented
Declaration
Objective-C
BOOL required
-
Undocumented
Declaration
Objective-C
BOOL autoValidate
-
Undocumented
Declaration
Objective-C
BOOL existsInNormalMode
-
Undocumented
Declaration
Objective-C
BOOL existsInEditingMode
-
Undocumented
Declaration
Objective-C
BOOL existsInCreationMode
-
Undocumented
Declaration
Objective-C
BOOL existsInDetailMode
-
Allocates and returns an initialized ‘SCPropertyDefinition’ given a property name. *
- - parameter: propertyName The name of the property.
Declaration
Objective-C
+ (instancetype)definitionWithName:(NSString *)propertyName;
-
Allocates and returns an initialized ‘SCPropertyDefinition’ given a property name, title, and type. *
- - parameter: propertyName The name of the property.
- - parameter: propertyTitle The title of the property. Property titles are used by user interface elements to generate labels associated with the generated controls.
- - parameter: propertyType The property type determines which user interface element will be generated for the property.
Declaration
Objective-C
+ (instancetype)definitionWithName:(NSString *)propertyName title:(NSString *)propertyTitle type:(SCPropertyType)propertyType;
-
Returns an initialized ‘SCPropertyDefinition’ given a property name. *
- - parameter: propertyName The name of the property.
Declaration
Objective-C
- (instancetype)initWithName:(NSString *)propertyName;
-
Returns an initialized ‘SCPropertyDefinition’ given a property name, title, and type. *
- - parameter: propertyName The name of the property.
- - parameter: propertyTitle The title of the property. Property titles are used by user interface elements to generate labels associated with the generated controls.
- - parameter: propertyType The property type determines which user interface element will be generated for the property.
Declaration
Objective-C
- (instancetype)initWithName:(NSString *)propertyName title:(NSString *)propertyTitle type:(SCPropertyType)propertyType;
-
The owner data structure definition of the property definition. *
- - warning: This property gets set automatically by the framework, you should never set this property manually.
Declaration
Objective-C
@property (nonatomic, weak) SCDataDefinition *ownerDataStuctureDefinition;
-
The name of the property associated with the property definition.
Declaration
Objective-C
@property (nonatomic, readonly) NSString *name;
-
The title of the property. Property titles are used by user interface elements to generate labels associated with the generated controls.
Declaration
Objective-C
@property (nonatomic, copy) NSString *title;
-
The type of the property. Property types determines which user interface element will be generated for the property.
Declaration
Objective-C
@property (nonatomic) SCPropertyType type;
-
The attibutes set associated with the type of the property. Property attributes gives the user the ability to further customize the user interface element that will be generated for the given property type.
Declaration
Objective-C
@property (nonatomic, strong) SCPropertyAttributes *attributes;
-
The set of cell action blocks.
Declaration
Objective-C
@property (nonatomic, readonly) SCCellActions *cellActions;
-
The type of the property while in editing mode. Property types determines which user interface element will be generated for the property while in editing mode.
Note
If not set (or set to SCPropertyTypeUndefined), the value set in the “type” property is used in editing mode.Declaration
Objective-C
@property (nonatomic) SCPropertyType editingModeType;
-
The attibutes set associated with the editingModetype of the property. Property attributes gives the user the ability to further customize the user interface element that will be generated for the given property editingModetype.
Declaration
Objective-C
@property (nonatomic, strong) SCPropertyAttributes *editingModeAttributes;
-
Set to TRUE if property is a required property. Default: FALSE.
Declaration
Objective-C
@property (nonatomic) BOOL required;
-
Set to TRUE if the property value should be automatically validated by the user interface element before commiting it to the property. If the user chooses to provide custom validation using either the cell’s actions, or the model’s SCTableViewModelDelegate, they should set this property to FALSE. Default: TRUE.
Declaration
Objective-C
@property (nonatomic) BOOL autoValidate;
-
If set to TRUE, a user interface is generated for the property when the owning control is in Normal Mode, otherwise, no UI is generated in that mode. Default: TRUE.
Declaration
Objective-C
@property (nonatomic) BOOL existsInNormalMode;
-
If set to TRUE, a user interface is generated for the property when the owning control is in Editing Mode, otherwise, no UI is generated in that mode. Default: TRUE.
Declaration
Objective-C
@property (nonatomic) BOOL existsInEditingMode;
-
If set to TRUE, a user interface is generated for the property when the UI is generated for a newly created object, otherwise, no UI is generated. Default: TRUE.
Declaration
Objective-C
@property (nonatomic) BOOL existsInCreationMode;
-
If set to TRUE, a user interface is generated for the property when the UI is generated for an existing object, otherwise, no UI is generated. Default: TRUE.
Declaration
Objective-C
@property (nonatomic) BOOL existsInDetailMode;
-
The class of the custom user interface element the property will generate. Set this property to override the standard user interface element generated by the property’s ‘type’. *
- - note: No need to set if ‘uiElementNibName’ contains a valid value.
Declaration
Objective-C
@property (nonatomic, strong) Class uiElementClass;
-
The Nib name of the custom user interface element the property will generate. Set this property to override the standard user interface element generated by the property’s ‘type’. *
- - note: Do not include the ‘.xib’ extension when providing the nib name.
- - note: If the NIB is a SwiftPM resource then the name should use a PACKAGE_TARGET_Name format.
Declaration
Objective-C
@property (nonatomic, copy) NSString *uiElementNibName;
-
This dictionary specifies how each of the uiElementClass or uiElementNibName custom controls binds itself to the definition’s properties. Each dictionary key should be the tag string value of one of the uiElement’s custom controls, and the value should be the name of the definition’s property that is bound to that control.
Warning
IMPORTANT: All control tags must be greater than zero.Note
This property can be used interchangibly with objectBindingsStringDeclaration
Objective-C
@property (nonatomic, strong) NSDictionary *objectBindings;
-
This string specifies how each of the uiElementClass or uiElementNibName custom controls binds itself to the definition’s properties. The string should consist of a colon separated pair of control’s tag and the property name, while each pair should be separated by a semi-colon.
Example bindings string: NSString *bindingsString = @“1:firstName;2:lastName”;
Warning
IMPORTANT: All control tags must be greater than zero.Note
This property can be used interchangibly with objectBindingsDeclaration
Objective-C
@property (nonatomic, copy) NSString *objectBindingsString;
-
This property is automatically set by the framework and should never be assigned a value directly.
Declaration
Objective-C
@property (nonatomic) SCDataType dataType;
-
Returns TRUE if the property’s dataType is scalar.
Declaration
Objective-C
@property (nonatomic, readonly) BOOL dataTypeScalar;
-
This property is automatically set by the framework and should never be assigned a value directly.
Declaration
Objective-C
@property (nonatomic) BOOL dataReadOnly;
-
Undocumented
Declaration
Objective-C
- (void)setAllPropertiesFromibDictionary:(NSDictionary *)ibDictionary;