Created
November 13, 2014 04:18
-
-
Save muyexi/ea5955723518272c8776 to your computer and use it in GitHub Desktop.
Custom iOS6 UI to like iOS7
This file contains hidden or 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 appearance] setBackgroundImage:[UIImage new] | |
forState:UIControlStateNormal | |
barMetrics:UIBarMetricsDefault]; | |
[[UINavigationBar appearance] setTitleTextAttributes:@{ | |
NSForegroundColorAttributeName: [UIColor blackColor], | |
NSFontAttributeName: [UIFont systemFontOfSize:17], | |
UITextAttributeTextShadowOffset: [NSValue valueWithUIOffset:UIOffsetZero] | |
}]; | |
[[UIBarButtonItem appearance] setTitleTextAttributes:@{ | |
UITextAttributeFont: [UIFont systemFontOfSize:17], | |
UITextAttributeTextShadowOffset: [NSValue valueWithUIOffset:UIOffsetZero] | |
} | |
forState:UIControlStateNormal]; | |
[[UITabBar appearance] setBackgroundImage:[UIImage imageWithColor:[UIColor gray225]]]; | |
[[UITabBar appearance] setSelectionIndicatorImage:[UIImage new]]; | |
//Custom back button image for iOS6 & iOS7 | |
[[UIBarButtonItem appearance] setBackButtonBackgroundImage:[[UIImage imageNamed:@"icon_tabbar_back"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 18, 0, 0)] | |
forState:UIControlStateNormal | |
barMetrics:UIBarMetricsDefault]; | |
//Hide back button title for iOS6 & iOS7 | |
[[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(0, -60) | |
forBarMetrics:UIBarMetricsDefault]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment