ios 更改全局UINavigationBar的背景图片以及通知栏颜色
2013-08-21 10:50
344 查看
1.更改UINavigationController push 到另一个界面返回按钮的title
self.navigationController.navigationBar.topItem.backBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"Back" style:UIBarButtonItemStylePlain target:nil action:nil];
2.更改全局UINavigationBar的背景图片以及通知栏颜色
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch. UIImage *navBackgroundImage = [UIImage imageNamed:@"navbar.png"]; [[UINavigationBar appearance] setBackgroundImage:navBackgroundImage forBarMetrics:UIBarMetricsDefault]; }
3.设置全局UIBarButtonItem的背景颜色
[[UIBarButtonItem appearance] setTintColor:[UIColor colorWithRed:0/255.0 green:128.0/255.0 blue:192.0/255.0 alpha:1.0]];
4.设置title标题颜色
NSDictionary *textTitleOptions = [NSDictionarydictionaryWithObjectsAndKeys:[UIColordarkGrayColor], UITextAttributeTextColor, [UIColorwhiteColor], UITextAttributeTextShadowColor, nil];
相关文章推荐
- IOS设置导航栏全局的背景图片、导航栏title文字颜色大小、导航栏左右按钮的颜色。
- iOS设置UINavigationBar的背景颜色或背景图片
- 修改iOS导航栏标题的字体颜色和大小以及导航栏的背景图片
- iOS中设置导航栏的背景颜色和标题字体以及颜色,以及tabBarItem的图片和字体颜色的设置
- 设置 UINavigationBar 全局颜色,背景颜色,前景颜色 swift 3 4 ios 10 +
- ios更改UITabBarController背景以及选中背景图片的方法
- IOS 7修改UITabbar背景图片、UITabBarItem图片以及UITabBarItem的文字颜色.
- ios更改UITabBarController背景以及选中背景图片的方法 以及隐藏tabbar
- UGUI 如何代码更改image的背景图片、颜色以及材质
- ios更改UITabBarController背景以及选中背景图片的方法
- iOS设置UINavigationBar的背景颜色或背景图片
- ios更改UITabBarController背景以及选中背景图片的方法
- ios中UITableViewCell选中后的颜色设置和背景图片
- iOS设置UITableView的背景图片,以及不显示多余的空Cell
- iOS-更改状态栏背景和文字颜色(OC + Swift3)
- ios设置导航栏背景图片、返回按钮背景、标题颜色等等
- 更改图片背景颜色为白色
- 背景颜色和图片更改。
- ios 自定义导航栏背景图片和颜色
- iOS平台设置系统状态栏(通知栏、顶部状态栏)样式背景颜色或透明