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
-
styleIdThe ID for this styleable object. Ideally, this value should be unique within the context being styled.
property required method -
styleClassThe CSS classes associated with this styleable object. One or more classes may be specified by delimiting each with whitespace
property required method -
styleClassesReturn an array of the styleClass separated by whitespace for faster performance
property required method -
styleChangeableFor support in cache, programing change style or class style
property required method -
styleModeThe styling mode of the styleable as defined by the PXStylingMode enumeration.
property required method -
pxStyleElementNameThe element name to use when matching this styleable object against a selector
property required method -
pxStyleParentThe style parent that contains this object
property required method -
pxStyleChildrenThe style children owned by this object
property required method -
boundsThe bounds of the item being styled
property required method -
frameThe frame of the item being styled
property required method -
– styleKeyReturn a key used to classify this styleable
required method -
– updateStylesUpdate styles for this styleable and all of its descendant styleables
-
– updateStylesNonRecursivelyUpdate styles for this styleable only
-
– updateStylesAsyncUpdate styles for this styleable and all of its descendant styleables asynchronously
-
– updateStylesNonRecursivelyAsyncUpdate styles for this styleable only asynchronously
-
styleCSSInline styles to apply to this object
property -
pxStyleNamespaceReturn the namespace URI associated with this object
property -
supportedPseudoClassesReturn a list of pseudo-classes that are recognized by this object
property -
defaultPseudoClassReturn 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
-
– preventStylingReturn 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
-
supportedPseudoElementsReturn a list of pseudo-elements that are recognized by this object
property -
– registerNotificationsRegister 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
-
– animationPropertyHandlersReturn a dictionary for animatable properties
Properties
bounds
The bounds of the item being styled
@property (nonatomic) CGRect boundsDiscussion
The bounds of the item being styled
Declared In
PXStyleable.hdefaultPseudoClass
Return the default pseudo-class associated with this object when none is specified in a selector
@property (readonly, nonatomic, copy) NSString *defaultPseudoClassDiscussion
Return the default pseudo-class associated with this object when none is specified in a selector
Declared In
PXStyleable.hframe
The frame of the item being styled
@property (nonatomic) CGRect frameDiscussion
The frame of the item being styled
Declared In
PXStyleable.hpxStyleChildren
The style children owned by this object
@property (readonly, nonatomic, copy) NSArray *pxStyleChildrenDiscussion
The style children owned by this object
Declared In
PXStyleable.hpxStyleElementName
The element name to use when matching this styleable object against a selector
@property (readonly, nonatomic, copy) NSString *pxStyleElementNameDiscussion
The element name to use when matching this styleable object against a selector
Declared In
PXStyleable.hpxStyleNamespace
Return the namespace URI associated with this object
@property (readonly, nonatomic, copy) NSString *pxStyleNamespaceDiscussion
Return the namespace URI associated with this object
Declared In
PXStyleable.hpxStyleParent
The style parent that contains this object
@property (readonly, nonatomic, weak) id pxStyleParentDiscussion
The style parent that contains this object
Declared In
PXStyleable.hstyleCSS
Inline styles to apply to this object
@property (nonatomic, copy) NSString *styleCSSDiscussion
Inline styles to apply to this object
Declared In
PXStyleable.hstyleChangeable
For support in cache, programing change style or class style
@property (nonatomic) BOOL styleChangeableDiscussion
For support in cache, programing change style or class style
Declared In
PXStyleable.hstyleClass
The CSS classes associated with this styleable object. One or more classes may be specified by delimiting each with whitespace
@property (nonatomic, copy) NSString *styleClassDiscussion
The CSS classes associated with this styleable object. One or more classes may be specified by delimiting each with whitespace
Declared In
PXStyleable.hstyleClasses
Return an array of the styleClass separated by whitespace for faster performance
@property (nonatomic, readonly) NSArray *styleClassesDiscussion
Return an array of the styleClass separated by whitespace for faster performance
Declared In
PXStyleable.hstyleId
The ID for this styleable object. Ideally, this value should be unique within the context being styled.
@property (nonatomic, copy) NSString *styleIdDiscussion
The ID for this styleable object. Ideally, this value should be unique within the context being styled.
Declared In
PXStyleable.hstyleMode
The styling mode of the styleable as defined by the PXStylingMode enumeration.
@property (nonatomic) PXStylingMode styleModeDiscussion
The styling mode of the styleable as defined by the PXStylingMode enumeration.
Declared In
PXStyleable.hInstance Methods
animationPropertyHandlers
Return a dictionary for animatable properties
- (NSDictionary *)animationPropertyHandlersDiscussion
Return a dictionary for animatable properties
Declared In
PXStyleable.hattributeValueForName: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 *)aNamespaceParameters
- 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.hcanStylePseudoClass:
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 *)pseudoClassDiscussion
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.hpreventStyling
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)preventStylingDiscussion
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.hregisterNotifications
Register any NSNotificationCenter notifications needed by this object
- (void)registerNotificationsDiscussion
Register any NSNotificationCenter notifications needed by this object
Declared In
PXStyleable.hstyleKey
Return a key used to classify this styleable
- (NSString *)styleKeyDiscussion
Return a key used to classify this styleable
Declared In
PXStyleable.hstyleableForPseudoElement:
Return the styleable associated with the given pseudo-element
- (id<PXStyleable>)styleableForPseudoElement:(NSString *)pseudoElementParameters
- pseudoElement
The pseudo-element name
Discussion
Return the styleable associated with the given pseudo-element
Declared In
PXStyleable.hupdateStyles
Update styles for this styleable and all of its descendant styleables
- (void)updateStylesDiscussion
Update styles for this styleable and all of its descendant styleables
Declared In
PXStyleable.hupdateStylesAsync
Update styles for this styleable and all of its descendant styleables asynchronously
- (void)updateStylesAsyncDiscussion
Update styles for this styleable and all of its descendant styleables asynchronously
Declared In
PXStyleable.h