搜索
您的当前位置:首页正文

「iOS」怎么修改去掉Navigation Bar上的返回按钮文

来源:二三娱乐

解决方法 1:

自从IOS7后UINavigationBar的一些属性的行为发生了变化.你可以在下图看到:

背景颜色

self.navigationController.navigationBar.barTintColor = [UIColor blackColor];\

//去掉导航条的半透明\

Navbar.translucent=YES;

按钮颜色(返回按钮的颜色设置)

[[UINavigationBarappearance]setTintColor:[UIColorwhiteColor]];

或者

self.navigationController.navigationBar.tintColor = [UIColor whiteColor];

标题字体和颜色:

[self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor whiteColor]}];

[[UIBarButtonItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor clearColor]} forState:UIControlStateNormal];

去掉返回按钮的字:

[[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(0, -60) forBarMetrics:UIBarMetricsDefault];

Top