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

Overview

A simple in-memory cache for stylesheets.

It is recommended that you use this object to store stylesheets in a centralized location. Ideally you would have one stylesheet cache throughout the lifetime of your application.

Using a stylesheet cache with Chameleon

A stylesheet cache must be used with the Chameleon observer so that changes can be sent for a given stylesheet. This is because changes are sent using the stylesheet object as the notification object, so a listener must register notifications with the stylesheet as the object.

NIStylesheet* stylesheet = [stylesheetCache stylesheetWithPath:@"common.css"];
NSNotificationCenter* nc = [NSNotificationCenter defaultCenter];
[nc addObserver:self
       selector:@selector(stylesheetDidChange)
           name:NIStylesheetDidChangeNotification
         object:stylesheet];

Definition at line 46 of file NIStylesheetCache.h.

Methods

NSStringpathPrefix property
(id) - initWithPathPrefix:
(NIStylesheet *) - stylesheetWithPath:loadFromDisk:
(NIStylesheet *) - stylesheetWithPath:

Method Documentation

- NIStylesheetCache: [read, copy]

The path prefix that will be used to load stylesheets.

Definition at line 52 of file NIStylesheetCache.h.

- (id) initWithPathPrefix: (NSString *)  pathPrefix

Initializes a newly allocated stylesheet cache with a given path prefix.

Definition at line 41 of file NIStylesheetCache.m.

- (NIStylesheet *) stylesheetWithPath: (NSString *)  path
loadFromDisk: (BOOL)  loadFromDisk 

Fetches a stylesheet from the in-memory cache if it exists or loads the stylesheet from disk if loadFromDisk is YES.

Definition at line 59 of file NIStylesheetCache.m.

- (NIStylesheet *) stylesheetWithPath: (NSString *)  path

Fetches a stylesheet from the in-memory cache if it exists or loads the stylesheet from disk.

Short form for calling [cache stylesheetWithPath:path loadFromDisk:YES]

Definition at line 86 of file NIStylesheetCache.m.

Generated for Nimbus by doxygen 1.7.4-20110629