OGeek|极客世界-中国程序员成长平台

标题: ios - 在 iOS 的多个 View 中使用 UINavigationController 中的固定背景图像? [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-13 09:53
标题: ios - 在 iOS 的多个 View 中使用 UINavigationController 中的固定背景图像?

我想为整个应用程序使用相同的背景图像,所以我创建了一个普通的 UIViewControllerUIImageViewUIContainerView 包含一个导航 Controller 。然后我将所有 ViewController 的背景颜色设置为 Clear Color 这是我的 Storyboard:

my storyboard

但是当我点击按钮时,它们之间的segue 有一些黑色的alpha 背景。看这个 GIF:

GIF

那么有没有更好的方法来实现这一点?或者我该如何解决这个问题?谢谢!



Best Answer-推荐答案


我建议继承 UINavigationController 并在您的 CustomNavController viewDidLoad 中:

关于ios - 在 iOS 的多个 View 中使用 UINavigationController 中的固定背景图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32092730/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://sqlite.in/) Powered by Discuz! X3.4