ios – 半透明的UINavigationBar

ios – 半透明的UINavigationBar,第1张

概述我很难让我的UINavigationBar完全透明,只有白色文字&按钮显示在它上面,以便我用于ViewController背景的 ImageView在顶部完全可见. 我已尝试过其他代码: // Set the BarTintColor to translucent and text colors to whiteself.navigationController.navigationBar.ba 我很难让我的UINavigationbar完全透明,只有白色文字&按钮显示在它上面,以便我用于VIEwController背景的 ImageVIEw在顶部完全可见.

我已尝试过其他代码:

// Set the barTintcolor to translucent and text colors to whiteself.navigationController.navigationbar.barTintcolor = [UIcolor clearcolor];self.navigationController.navigationbar.TitleTextAttributes = [NSDictionary dictionaryWithObject:[UIcolor whitecolor] forKey:UITextAttributeTextcolor];self.navigationController.navigationbar.tintcolor = [UIcolor whitecolor];

但是this是结果,一个黑色的UINavigationbar,我怎么能解决这个问题呢?

该应用程序从ViewController推进到ViewController,其中UINavigationbar淡出为红色.还有其他几个VIEwControllers执行相同的淡入淡出动画,因此需要UINavigationbar

带有“Ny”按钮的第一个VIEwController的部分将得到改进;) – 只需要开始使用像Photoshop这样的工具

谢谢!
埃里克

解决方法 这是我用来使导航栏透明的方法:

[self.navigationController.navigationbar setBackgroundImage:[UIImage new] forbarMetrics:UIbarMetricsDefault];self.navigationController.navigationbar.translucent = YES;
总结

以上是内存溢出为你收集整理的ios – 半透明的UINavigationBar全部内容,希望文章能够帮你解决ios – 半透明的UINavigationBar所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1077059.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-26
下一篇2022-05-26

发表评论

登录后才能评论

评论列表(0条)

    保存