Created
February 27, 2013 02:41
-
-
Save MKSG-MugunthKumar/5044533 to your computer and use it in GitHub Desktop.
UIAppearance for nav bar customization.
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
[[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil] | |
setBackgroundImage:[[UIImage imageNamed:@"NavButton"] stretchableImageWithLeftCapWidth:10 topCapHeight:0] | |
forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; | |
[[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil] | |
setBackButtonBackgroundImage:[[UIImage imageNamed:@"BackButton"] stretchableImageWithLeftCapWidth:15 topCapHeight:0] | |
forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; | |
[[UINavigationBar appearance] setTintColor:[UIColor rmRedColor]]; | |
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"NavBarBG"] | |
forBarMetrics:UIBarMetricsDefault]; | |
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleBlackOpaque; | |
[[UINavigationBar appearance] setTitleTextAttributes:@{ | |
UITextAttributeFont:[UIFont fontWithName:@"Aller-Bold" size:20], | |
UITextAttributeTextColor:[UIColor whiteColor], | |
UITextAttributeTextShadowColor:[UIColor colorWithWhite:0.0 alpha:0.5], | |
UITextAttributeTextShadowOffset:[NSValue valueWithCGSize:CGSizeMake(0.0f, 1.0f)] | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment