Click here to support Nimbus development and make a donation at www.pledgie.com !
An iOS framework whose growth is bounded by O(documentation).
NIStylesheet Class Reference

Overview

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:

Method Documentation

- (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.

Parameters:
pathThe 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.
Returns:
YES if the CSS file was successfully loaded and parsed, NO otherwise.

Definition at line 163 of file NIStylesheet.m.

- (BOOL) loadFromPath: (NSString *)  path
pathPrefix: (NSString *)  path 
See also:
- loadFromPath:pathPrefix:delegate:

Definition at line 157 of file NIStylesheet.m.

- (BOOL) loadFromPath: (NSString *)  path
See also:
- loadFromPath:pathPrefix:delegate:

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.

Parameters:
viewThe view for which styles should be applied.
classNameEither 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.

Parameters:
classNameEither 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.

Generated for Nimbus by doxygen 1.7.4-20110629