-
-
Save marshluca/1308357 to your computer and use it in GitHub Desktop.
UINavigationController custom navigation bar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
// Override point for customization after application launch. | |
// Create a new window and assign directly to provided iVar | |
_window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | |
// Implementation of new init method | |
MyCustomNavigationBar *navigationBar = [[MyCustomNavigationBar alloc] initWithFrame:CGRectZero]; | |
UINavigationController *navigationController = [[UINavigationController alloc] initWithCustomNavigationBar:navigationBar]; | |
[navigationBar release]; | |
[self.window setRootViewController:navigationController]; | |
[navigationController release]; | |
[self.window makeKeyAndVisible]; | |
return YES; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment