RBThemeSchema Class Reference
Inherits from | NSObject |
---|---|
Declared in | RBThemeSchema.h |
typeClass
The object type that the schema describes the available theming options for. nil
if not an object.
@property (nonatomic, readonly, nullable) Class typeClass
Discussion
The object type that the schema describes the available theming options for. nil
if not an object.
Declared In
RBThemeSchema.h
typeName
The string name of the type that the schema describes the available theming options for.
@property (nonatomic, readonly, nonnull) NSString *typeName
Discussion
The string name of the type that the schema describes the available theming options for.
Declared In
RBThemeSchema.h
typeIsEnum
Whether or not the type is an enumeration.
@property (nonatomic, readonly) BOOL typeIsEnum
Discussion
Whether or not the type is an enumeration.
Declared In
RBThemeSchema.h
notes
An array of notes about the theming options available on this type.
@property (nonatomic, readonly, nullable) NSArray<NSString*> *notes
Discussion
An array of notes about the theming options available on this type.
Declared In
RBThemeSchema.h
states
An array of RBThemeSchemaState
of the different states that can be optionally independantly themed.
@property (nonatomic, readonly, nullable) NSArray<RBThemeSchemaState*> *states
Discussion
An array of RBThemeSchemaState
of the different states that can be optionally independantly themed.
Declared In
RBThemeSchema.h
fields
A dictionary containing the RBThemeSchema
objects for each field key on this type.
@property (nonatomic, readonly, nullable) NSDictionary<NSString*RBThemeSchema*> *fields
Discussion
A dictionary containing the RBThemeSchema
objects for each field key on this type.
Declared In
RBThemeSchema.h
– initWithTypeClass:withParentSchema:
Initializes a new theme schema for an object type.
- (nonnull instancetype)initWithTypeClass:(nonnull Class)typeClass withParentSchema:(nullable RBThemeSchema *)parentSchema
Parameters
typeClass |
The |
---|---|
parentSchema |
The parent schema, or |
Return Value
The initialized theme schema instance.
Discussion
Initializes a new theme schema for an object type.
Declared In
RBThemeSchema.h
– initWithNativeType:withParentSchema:
Initializes a new theme schema for a named type.
- (nonnull instancetype)initWithNativeType:(RBThemeNativeType)nativeType withParentSchema:(nullable RBThemeSchema *)parentSchema
Parameters
nativeType |
The native type of the property. |
---|---|
parentSchema |
The parent schema, or |
Return Value
The initialized theme schema instance.
Discussion
Initializes a new theme schema for a named type.
Declared In
RBThemeSchema.h
– initWithTypeName:withParentSchema:
Initializes a new theme schema for a named type.
- (nonnull instancetype)initWithTypeName:(nonnull NSString *)typeName withParentSchema:(nullable RBThemeSchema *)parentSchema
Parameters
typeName |
The name of the type. |
---|---|
parentSchema |
The parent schema, or |
Return Value
The initialized theme schema instance.
Discussion
Initializes a new theme schema for a named type.
Declared In
RBThemeSchema.h
– initWithEnumTypeName:withParentSchema:
Initializes a new theme schema for an enumeration type.
- (nonnull instancetype)initWithEnumTypeName:(nonnull NSString *)enumTypeName withParentSchema:(nullable RBThemeSchema *)parentSchema
Parameters
enumTypeName |
The name of the enumeration type. |
---|---|
parentSchema |
The parent schema, or |
Return Value
The initialized theme schema instance.
Discussion
Initializes a new theme schema for an enumeration type.
Declared In
RBThemeSchema.h
– importThemeSchema:
– addNote:
Add a note to the theme schema.
- (void)addNote:(nonnull NSString *)noteString
Parameters
noteString |
The note string to add. |
---|
Discussion
Add a note to the theme schema.
Declared In
RBThemeSchema.h
– addState:
Add a state that can be independantly themed.
- (void)addState:(nonnull RBThemeSchemaState *)state
Parameters
state |
The details of the state. |
---|
Discussion
Add a state that can be independantly themed.
Declared In
RBThemeSchema.h
– setPropertyWithName:schema:
Set the RBThemeSchema
object for a given property name.
- (nullable RBThemeSchema *)setPropertyWithName:(nonnull NSString *)propertyName schema:(nonnull RBThemeSchema *)themeSchema
Parameters
propertyName |
The name of the property. |
---|---|
themeSchema |
The |
Return Value
The assigned RBThemeSchema
object.
Discussion
Set the RBThemeSchema
object for a given property name.
Declared In
RBThemeSchema.h
– setPropertyWithName:type:notes:
Set a theme property to an object type.
- (nullable RBThemeSchema *)setPropertyWithName:(nonnull NSString *)propertyName type:(nonnull Class)type notes:(nullable NSString *)notes
Parameters
propertyName |
The name of the property. |
---|---|
type |
The |
notes |
An optional accompanying note for the property. |
Return Value
The assigned RBThemeSchema
object.
Discussion
Set a theme property to an object type.
Declared In
RBThemeSchema.h
– setPropertyWithName:nativeType:notes:
Set a theme property to an object type.
- (nullable RBThemeSchema *)setPropertyWithName:(nonnull NSString *)propertyName nativeType:(RBThemeNativeType)nativeType notes:(nullable NSString *)notes
Parameters
propertyName |
The name of the property. |
---|---|
nativeType |
The native type of the property. |
notes |
An optional accompanying note for the property. |
Return Value
The assigned RBThemeSchema
object.
Discussion
Set a theme property to an object type.
Declared In
RBThemeSchema.h
– setPropertyWithName:typeName:notes:
Set a theme property to a named type.
- (nullable RBThemeSchema *)setPropertyWithName:(nonnull NSString *)propertyName typeName:(nonnull NSString *)typeName notes:(nullable NSString *)notes
Parameters
propertyName |
The name of the property. |
---|---|
typeName |
The name of the type of the property. |
notes |
An optional accompanying note for the property. |
Return Value
The assigned RBThemeSchema
object.
Discussion
Set a theme property to a named type.
Declared In
RBThemeSchema.h
– setEnumPropertyWithName:enumerationTypeName:notes:
Set a theme property to an enumeration type.
- (nullable RBThemeSchema *)setEnumPropertyWithName:(nonnull NSString *)propertyName enumerationTypeName:(nonnull NSString *)enumerationTypeName notes:(nullable NSString *)notes
Parameters
propertyName |
The name of the property. |
---|---|
enumerationTypeName |
The name of the enumeration type. |
notes |
An optional accompanying note for the property. |
Return Value
The assigned RBThemeSchema
object.
Discussion
Set a theme property to an enumeration type.
Declared In
RBThemeSchema.h
– removeStateWithName:
Removes the state with the given name.
- (void)removeStateWithName:(nonnull NSString *)stateName
Parameters
stateName |
The name of the state to remove. |
---|
Discussion
Removes the state with the given name.
Declared In
RBThemeSchema.h
– removePropertyWithName:
Removes the property with the given name.
- (void)removePropertyWithName:(nonnull NSString *)propertyName
Parameters
propertyName |
The name of the state to remove. |
---|
Discussion
Removes the property with the given name.
Declared In
RBThemeSchema.h
– removeAllProperties
Removes all properties.
- (void)removeAllProperties
Discussion
Removes all properties.
Declared In
RBThemeSchema.h
– dictionary
Serialises the theme schema to a property list.
- (nonnull NSDictionary<NSString*,id> *)dictionary
Return Value
The serialised theme schema.
Discussion
Serialises the theme schema to a property list.
Declared In
RBThemeSchema.h
+ allTypesWithSchemas
Searches for and returns an array of all the Class
types that have theme schemas.
+ (nullable NSArray<Class> *)allTypesWithSchemas
Return Value
The NSArray
of Class
objects that have the selector ‘generateThemeSchemaWithParent’ objects.
Discussion
Searches for and returns an array of all the Class
types that have theme schemas.
Declared In
RBThemeSchema.h
+ treesForTypes:
Recursively generates theme schemas for the given types, returning the schemas in a serialised property list tree.
+ (nonnull NSArray<NSDictionary<NSString*,id> *> *)treesForTypes:(nonnull NSArray<Class> *)types
Parameters
types |
The types to generate schemas for. |
---|
Return Value
An array of dictionaries containing the serialised theme schemas.
Discussion
Recursively generates theme schemas for the given types, returning the schemas in a serialised property list tree.
Declared In
RBThemeSchema.h