Nimbus
0.9.3 - Nimbus is proudly hosted on Github
An iOS framework whose growth is bounded by O(documentation).
|
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.
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 | |
NSString * | pathPrefix property |
(id) | - initWithPathPrefix: |
(NIStylesheet *) | - stylesheetWithPath:loadFromDisk: |
(NIStylesheet *) | - stylesheetWithPath: |
- 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.