PXStyleable Protocol Reference
Conforms to | NSObject |
Declared in | PXStyleable.h |
Overview
The PXStyleable protocol defines a set of properties and methods needed in order to style a given object.
Tasks
-
styleId
The ID for this styleable object. Ideally, this value should be unique within the context being styled.
property required method -
styleClass
The CSS classes associated with this styleable object. One or more classes may be specified by delimiting each with whitespace
property required method -
styleClasses
Return an array of the styleClass separated by whitespace for faster performance
property required method -
styleChangeable
For support in cache, programing change style or class style
property required method -
styleMode
The styling mode of the styleable as defined by the PXStylingMode enumeration.
property required method -
pxStyleElementName
The element name to use when matching this styleable object against a selector
property required method -
pxStyleParent
The style parent that contains this object
property required method -
pxStyleChildren
The style children owned by this object
property required method -
bounds
The bounds of the item being styled
property required method -
frame
The frame of the item being styled
property required method -
– styleKey
Return a key used to classify this styleable
required method -
– updateStyles
Update styles for this styleable and all of its descendant styleables
-
– updateStylesNonRecursively
Update styles for this styleable only
-
– updateStylesAsync
Update styles for this styleable and all of its descendant styleables asynchronously
-
– updateStylesNonRecursivelyAsync
Update styles for this styleable only asynchronously
-
styleCSS
Inline styles to apply to this object
property -
pxStyleNamespace
Return the namespace URI associated with this object
property -
supportedPseudoClasses
Return a list of pseudo-classes that are recognized by this object
property -
defaultPseudoClass
Return the default pseudo-class associated with this object when none is specified in a selector
property -
– canStylePseudoClass:
Return a boolean indicating if the styleable is able to style the specified pseudoClass. This is particularly helpful with styleables that define pseudo-states (for example, UITextField) where the styleable can only have a a given pseudoClass (state) applied to it if it is on that state already. Instances that do not implement this method will assume this method was called and it returned YES
-
– preventStyling
Return a boolean indicating if this styleable should be excluded from styling. Instances that do not implement this method will assume this method was called and it returned NO
-
supportedPseudoElements
Return a list of pseudo-elements that are recognized by this object
property -
– registerNotifications
Register any NSNotificationCenter notifications needed by this object
-
– attributeValueForName:withNamespace:
Return a string value for the specified attribute name. If the name does not exist, a nil value should be returned
-
– styleableForPseudoElement:
Return the styleable associated with the given pseudo-element
-
– animationPropertyHandlers
Return a dictionary for animatable properties
Properties
bounds
The bounds of the item being styled
@property (nonatomic) CGRect bounds
Discussion
The bounds of the item being styled
Declared In
PXStyleable.h
defaultPseudoClass
Return the default pseudo-class associated with this object when none is specified in a selector
@property (readonly, nonatomic, copy) NSString *defaultPseudoClass
Discussion
Return the default pseudo-class associated with this object when none is specified in a selector
Declared In
PXStyleable.h
frame
The frame of the item being styled
@property (nonatomic) CGRect frame
Discussion
The frame of the item being styled
Declared In
PXStyleable.h
pxStyleChildren
The style children owned by this object
@property (readonly, nonatomic, copy) NSArray *pxStyleChildren
Discussion
The style children owned by this object
Declared In
PXStyleable.h
pxStyleElementName
The element name to use when matching this styleable object against a selector
@property (readonly, nonatomic, copy) NSString *pxStyleElementName
Discussion
The element name to use when matching this styleable object against a selector
Declared In
PXStyleable.h
pxStyleNamespace
Return the namespace URI associated with this object
@property (readonly, nonatomic, copy) NSString *pxStyleNamespace
Discussion
Return the namespace URI associated with this object
Declared In
PXStyleable.h
pxStyleParent
The style parent that contains this object
@property (readonly, nonatomic, weak) id pxStyleParent
Discussion
The style parent that contains this object
Declared In
PXStyleable.h
styleCSS
Inline styles to apply to this object
@property (nonatomic, copy) NSString *styleCSS
Discussion
Inline styles to apply to this object
Declared In
PXStyleable.h
styleChangeable
For support in cache, programing change style or class style
@property (nonatomic) BOOL styleChangeable
Discussion
For support in cache, programing change style or class style
Declared In
PXStyleable.h
styleClass
The CSS classes associated with this styleable object. One or more classes may be specified by delimiting each with whitespace
@property (nonatomic, copy) NSString *styleClass
Discussion
The CSS classes associated with this styleable object. One or more classes may be specified by delimiting each with whitespace
Declared In
PXStyleable.h
styleClasses
Return an array of the styleClass separated by whitespace for faster performance
@property (nonatomic, readonly) NSArray *styleClasses
Discussion
Return an array of the styleClass separated by whitespace for faster performance
Declared In
PXStyleable.h
styleId
The ID for this styleable object. Ideally, this value should be unique within the context being styled.
@property (nonatomic, copy) NSString *styleId
Discussion
The ID for this styleable object. Ideally, this value should be unique within the context being styled.
Declared In
PXStyleable.h
styleMode
The styling mode of the styleable as defined by the PXStylingMode enumeration.
@property (nonatomic) PXStylingMode styleMode
Discussion
The styling mode of the styleable as defined by the PXStylingMode enumeration.
Declared In
PXStyleable.h
Instance Methods
animationPropertyHandlers
Return a dictionary for animatable properties
- (NSDictionary *)animationPropertyHandlers
Discussion
Return a dictionary for animatable properties
Declared In
PXStyleable.h
attributeValueForName:withNamespace:
Return a string value for the specified attribute name. If the name does not exist, a nil value should be returned
- (NSString *)attributeValueForName:(NSString *)name withNamespace:(NSString *)aNamespace
Parameters
- name
The name of the attribute
- aNamespace
The namespace of the attribute. This may be nil
Discussion
Return a string value for the specified attribute name. If the name does not exist, a nil value should be returned
Declared In
PXStyleable.h
canStylePseudoClass:
Return a boolean indicating if the styleable is able to style the specified pseudoClass. This is particularly helpful with styleables that define pseudo-states (for example, UITextField) where the styleable can only have a a given pseudoClass (state) applied to it if it is on that state already. Instances that do not implement this method will assume this method was called and it returned YES
- (BOOL)canStylePseudoClass:(NSString *)pseudoClass
Discussion
Return a boolean indicating if the styleable is able to style the specified pseudoClass. This is particularly helpful with styleables that define pseudo-states (for example, UITextField) where the styleable can only have a a given pseudoClass (state) applied to it if it is on that state already. Instances that do not implement this method will assume this method was called and it returned YES
Declared In
PXStyleable.h
preventStyling
Return a boolean indicating if this styleable should be excluded from styling. Instances that do not implement this method will assume this method was called and it returned NO
- (BOOL)preventStyling
Discussion
Return a boolean indicating if this styleable should be excluded from styling. Instances that do not implement this method will assume this method was called and it returned NO
Declared In
PXStyleable.h
registerNotifications
Register any NSNotificationCenter notifications needed by this object
- (void)registerNotifications
Discussion
Register any NSNotificationCenter notifications needed by this object
Declared In
PXStyleable.h
styleKey
Return a key used to classify this styleable
- (NSString *)styleKey
Discussion
Return a key used to classify this styleable
Declared In
PXStyleable.h
styleableForPseudoElement:
Return the styleable associated with the given pseudo-element
- (id<PXStyleable>)styleableForPseudoElement:(NSString *)pseudoElement
Parameters
- pseudoElement
The pseudo-element name
Discussion
Return the styleable associated with the given pseudo-element
Declared In
PXStyleable.h
updateStyles
Update styles for this styleable and all of its descendant styleables
- (void)updateStyles
Discussion
Update styles for this styleable and all of its descendant styleables
Declared In
PXStyleable.h
updateStylesAsync
Update styles for this styleable and all of its descendant styleables asynchronously
- (void)updateStylesAsync
Discussion
Update styles for this styleable and all of its descendant styleables asynchronously
Declared In
PXStyleable.h