PXStylerContext Class Reference
| Inherits from | NSObject |
| Declared in | PXStylerContext.h |
Tasks
-
+ transformString:usingAttribute:- Transform a string to uppercase, lowercase, or capitalize based on the css selector value.
- @param value String value to transform @ @param attribute CSS selector attribute.
-
+ kernPointsFrom:usingFont:Returns the kern value converted to points (from ems, %, or a lenght measurment).
-
+ addDecoration:toAttributes:- Add decoration attribute to attributed text attributes dictionary based on CSS decoration value (strike-through, underline).
- @param decoration CSS decoration value (for text-decoration) @ @param attribute attributedString attributes dictionary.
-
– mergeTextAttributes:Appends or overwrites the appropriate attributes into an attributedTest styles dictionary. @originalAttributes existing text attributes;
-
– attributedTextAttributes:withDefaultText:andColor:Generates the appropriate attributes in an attributedTest styles dictionary. @view The text container that attributed text is applied to (must implement font, text);
Class Methods
addDecoration:toAttributes:
- Add decoration attribute to attributed text attributes dictionary based on CSS decoration value (strike-through, underline).
- @param decoration CSS decoration value (for text-decoration) @ @param attribute attributedString attributes dictionary.
+ (void)addDecoration:(NSString *)decoration toAttributes:(NSMutableDictionary *)attributesDiscussion
- Add decoration attribute to attributed text attributes dictionary based on CSS decoration value (strike-through, underline).
- @param decoration CSS decoration value (for text-decoration) @ @param attribute attributedString attributes dictionary.
Declared In
PXStylerContext.hkernPointsFrom:usingFont:
Returns the kern value converted to points (from ems, %, or a lenght measurment).
+ (NSNumber *)kernPointsFrom:(PXDimension *)dimension usingFont:(UIFont *)fontDiscussion
Returns the kern value converted to points (from ems, %, or a lenght measurment).
Declared In
PXStylerContext.htransformString:usingAttribute:
- Transform a string to uppercase, lowercase, or capitalize based on the css selector value.
- @param value String value to transform @ @param attribute CSS selector attribute.
+ (NSString *)transformString:(NSString *)value usingAttribute:(NSString *)attributeDiscussion
- Transform a string to uppercase, lowercase, or capitalize based on the css selector value.
- @param value String value to transform @ @param attribute CSS selector attribute.
Declared In
PXStylerContext.hInstance Methods
attributedTextAttributes:withDefaultText:andColor:
Generates the appropriate attributes in an attributedTest styles dictionary. @view The text container that attributed text is applied to (must implement font, text);
- (NSMutableDictionary *)attributedTextAttributes:(UIView *)view withDefaultText:(NSString *)text andColor:(UIColor *)defaultColorParameters
- defaultColor
The color to be used if there is no color set in the css (the source of this can vary on states and components)
- defaultText
The text to be used if there is no text set in the css (the source of this can vary on states and components)
Discussion
Generates the appropriate attributes in an attributedTest styles dictionary. @view The text container that attributed text is applied to (must implement font, text);
Declared In
PXStylerContext.hmergeTextAttributes:
Appends or overwrites the appropriate attributes into an attributedTest styles dictionary. @originalAttributes existing text attributes;
- (NSDictionary *)mergeTextAttributes:(NSDictionary *)originalAttributesDiscussion
Appends or overwrites the appropriate attributes into an attributedTest styles dictionary. @originalAttributes existing text attributes;
Declared In
PXStylerContext.h