我很难使我的UINavigationBar完全透明,只显示白色文本和按钮,所以我用于ViewController背景的ImageView在顶部完全可见。
我试过这个代码和其他代码:
// Set the BarTintColor to translucent and text colors to white
self.navigationController.navigationBar.barTintColor = [UIColor clearColor];
self.navigationController.navigationBar.titleTextAttributes = [NSDictionary dictionaryWithObject:[UIColor whiteColor] forKey:UITextAttributeTextColor];
self.navigationController.navigationBar.tintColor = [UIColor whiteColor];但是这的结果是,一个黑色的UINavigationBar,,如何解决这个问题呢?
这个应用程序从这个ViewController推到这个ViewController,在那里UINavigationBar会变成红色。还有其他几个ViewControllers在执行相同的淡入动画,因此需要使用UINavigationBar。
第一个ViewController中带有"Ny“按钮的部分将得到改进;)--只需将我的手放在Photoshop之类的工具上
谢谢!埃里克
发布于 2014-09-11 12:42:01
这就是我用来使导航条透明的东西:
[self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
self.navigationController.navigationBar.translucent = YES;发布于 2014-09-11 12:37:48
加上这个
self. navigationController.navigationBar.translucent = YES;https://stackoverflow.com/questions/25787592
复制相似问题