本文共 397 字,大约阅读时间需要 1 分钟。
自从iOS7后UINavigationBar的一些属性的行为发生了变化.你可以在下图看到:
现在,如果你要修改它们的颜色,用下面的代码:
self.navigationController.navigationBar.barTintColor = [UIColor blackColor];self.navigationController.navigationBar.tintColor = [UIColor whiteColor];[self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor whiteColor]}];self.navigationController.navigationBar.translucent = NO;
转载地址:http://ecwhf.baihongyu.com/