The iOS framework that grows only as fast as its documentation
NICSSParser Class Reference

Overview

An Objective-C wrapper for the flex CSS parser.

Generates a dictionary of raw CSS rules from a given CSS file.

It is recommended that you do NOT use this object directly. Use NIStylesheet instead.

Terminology note: CSS selectors are referred to as "scopes" to avoid confusion with Objective-C selectors.

This object is not thread-safe.

Tasks

BOOL didFailToParse property
 
(NSDictionary *) - dictionaryForPath:pathPrefix:delegate:
 
(NSDictionary *) - dictionaryForPath:pathPrefix:
 
(NSDictionary *) - dictionaryForPath:
 

Method Documentation

didFailToParse

Will be YES after retrieving a dictionary if the parser failed to parse the file in any way.

@property (nonatomic, readonly) BOOL didFailToParse;

dictionaryForPath:pathPrefix:delegate:

Reads a CSS file from a given path and returns a dictionary of raw CSS rule sets.

- (NSDictionary*)dictionaryForPath:(NSString *)path pathPrefix:(NSString *)pathPrefix delegate:(id<NICSSParserDelegate>)delegate;
Discussion

If a pathPrefix is provided then all paths will be prefixed with this value.

For example, if a path prefix of "/bundle/css" is given and a CSS file has the statement "@import url('user/profile.css')", the loaded file will be "/bundle/css/user/profile.css".

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
A dictionary mapping CSS scopes to dictionaries of property names to values.

dictionaryForPath:pathPrefix:

dictionaryForPath: