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 *)attributes
Discussion
- 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.h
kernPointsFrom:usingFont:
Returns the kern value converted to points (from ems, %, or a lenght measurment).
+ (NSNumber *)kernPointsFrom:(PXDimension *)dimension usingFont:(UIFont *)font
Discussion
Returns the kern value converted to points (from ems, %, or a lenght measurment).
Declared In
PXStylerContext.h
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.
+ (NSString *)transformString:(NSString *)value usingAttribute:(NSString *)attribute
Discussion
- 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.h
Instance 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 *)defaultColor
Parameters
- 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.h
mergeTextAttributes:
Appends or overwrites the appropriate attributes into an attributedTest styles dictionary. @originalAttributes existing text attributes;
- (NSDictionary *)mergeTextAttributes:(NSDictionary *)originalAttributes
Discussion
Appends or overwrites the appropriate attributes into an attributedTest styles dictionary. @originalAttributes existing text attributes;
Declared In
PXStylerContext.h