Nimbus 0.9.3 - Nimbus is proudly hosted on Github
An iOS framework whose growth is bounded by O(documentation).
Class for saving and restoring the navigation appearance state.
You use this when you are about to mutate the navigation bar style and/or status bar style, and you want to be able to restore these bar styles sometime in the future.
An example of usage for this pattern is in NIToolbarPhotoViewController which changes the navigation bar style to UIBarStyleBlack and the status bar style to UIStatusBarStyleBlack* in viewWillAppear:.
[NINavigationAppearance pushAppearanceForNavigationController:self.navigationController] UINavigationBar* navBar = self.navigationController.navigationBar; navBar.barStyle = UIBarStyleBlack; navBar.translucent = YES;
Note that the call to NINavigationAppearance must occur before mutating any bar states so that it is able to capture the original state correctly.
Then when NIToolbarPhotoViewController is ready to restore the original navigation appearance state, (in viewWillDisappear:), it calls the following:
which pops the last snapshot of the stack and applies it, restoring the original navigation appearance state.
|+ (void) pushAppearanceForNavigationController:||(UINavigationController *)||navigationController|
|+ (void) popAppearanceForNavigationController:||(UINavigationController *)||navigationController|
|+ (NSInteger) count|