首页 > 代码库 > presented 新控制器时如果控制器的view背景颜色alpha不为1时,为什么会变成黑色背景。
presented 新控制器时如果控制器的view背景颜色alpha不为1时,为什么会变成黑色背景。
NavigationController and the View Controllers are designed in such a way that only one view controller may show at a time. When a new view controller is pushed/presented the previous view controller will be hidden by the system. So when you reduce the modal view‘s alpha you will possibly see the window‘s backgroundColor (the black color you see now).
If you want a translucent view to slide-in over the main view, you can add the view as the subView of main view and animate it using UIView Animations.
presented 新控制器时如果控制器的view背景颜色alpha不为1时,为什么会变成黑色背景。
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。