NimbusKit
1.2.1 - Fork Nimbus on Github - Visit the Nimbus Wiki
The iOS framework that grows only as fast as its documentation
|
An observer for the Chameleon server.
This observer connects to a Chameleon server and waits for changes in stylesheets. Once a stylesheet change has been detected, the new stylesheet is retrieved from the server and a notification is fired via NIStylesheetDidChangeNotification after the stylesheet has been reloaded.
Thanks to the use of NIOperations, the stylesheet loading and processing is accomplished on a separate thread. This means that the UI will only be notified of stylesheet changes once the request thread has successfully loaded and processed the changed stylesheet.
Tasks | |
(id) | - initWithStylesheetCache:host: |
(NIStylesheet *) | - stylesheetForPath: |
(void) | - watchSkinChanges |
(void) | - enableBonjourDiscovery: |
(NSString *) | - cssParser:pathFromPath: |
[NIOperationDelegate] State Changes | |
(void) | - nimbusOperationDidStart: |
(void) | - nimbusOperationWillFinish: |
(void) | - nimbusOperationDidFinish: |
(void) | - nimbusOperationDidFail:withError: |
Initializes a newly allocated Chameleon observer with a given stylesheet cache and host.
Returns a loaded stylesheet from the given path.
Begins listening to the Chameleon server for changes.
When changes are detected the Chameleon observer downloads the new CSS files, reloads them, and then fires the appropriate notifications.
Browses Bonjour for services with the given name (e.g.
your username) and sets the host automatically.
The operation has started executing.
The operation is about to complete successfully.
This will not be called if the operation fails.
This will be called from within the operation's runloop and must be thread safe.
The operation has completed successfully.
This will not be called if the operation fails.
The operation failed in some way and has completed.
operationDidFinish: will not be called.
The implementor may use this method to change the filename that will be used to load the CSS file from disk.
If nil is returned then the given filename will be used.
Example: This is used by the Chameleon observer to hash filenames with md5, effectively flattening the path structure so that the files can be accessed without creating subdirectories.