Nimbus
0.9.3 - Nimbus is proudly hosted on Github
An iOS framework whose growth is bounded by O(documentation).
|
Loads and caches information regarding a specific stylesheet.
Use this object to load and parse a CSS stylesheet from disk and then apply the stylesheet to views. Rulesets are cached on demand and cleared when a memory warning is received.
Stylesheets can be merged using the addStylesheet: method.
Cached rulesets are released when a memory warning is received.
Definition at line 46 of file NIStylesheet.h.
Methods | |
Properties | |
NSSet * | dependencies property |
Loading Stylesheets | |
(BOOL) | - loadFromPath:pathPrefix:delegate: |
(BOOL) | - loadFromPath:pathPrefix: |
(BOOL) | - loadFromPath: |
Compositing Stylesheets | |
(void) | - addStylesheet: |
Applying Stylesheets to Views | |
(void) | - applyStyleToView:withClassName: |
(NICSSRuleset *) | - rulesetForClassName: |
- (NSSet *) dependencies [read, copy] |
A set of NSString filenames for the in this stylesheet.
Definition at line 53 of file NIStylesheet.h.
- (BOOL) loadFromPath: | (NSString *) | path | |
pathPrefix: | (NSString *) | pathPrefix | |
delegate: | (id<NICSSParserDelegate>) | delegate | |
Loads and parses a CSS file from disk.
path | The path of the file to be read. |
pathPrefix | [optional] A prefix path that will be prepended to the given path as well as any imported files. |
delegate | [optional] A delegate that can reprocess paths. |
Definition at line 163 of file NIStylesheet.m.
Definition at line 157 of file NIStylesheet.m.
- (BOOL) loadFromPath: | (NSString *) | path |
Definition at line 151 of file NIStylesheet.m.
- (void) addStylesheet: | (NIStylesheet *) | stylesheet |
Merge another stylesheet with this one.
All property values in the given stylesheet will overwrite values in this stylesheet. Non-overlapping values will not be modified.
Definition at line 196 of file NIStylesheet.m.
- (void) applyStyleToView: | (UIView *) | view | |
withClassName: | (NSString *) | className | |
Apply any rulesets that match the className to the given view.
view | The view for which styles should be applied. |
className | Either the view's class as a string using NSStringFromClass([view class]); or a CSS class selector such as ".myClassSelector". |
Definition at line 255 of file NIStylesheet.m.
- (NICSSRuleset *) rulesetForClassName: | (NSString *) | className |
Returns an autoreleased ruleset for the given class name.
className | Either the view's class as a string using NSStringFromClass([view class]); or a CSS class selector such as ".myClassSelector". |
Definition at line 264 of file NIStylesheet.m.