码迷,mamicode.com
首页 > 其他好文 > 详细

presented 新控制器时如果控制器的view背景颜色alpha不为1时,为什么会变成黑色背景。

时间:2016-10-28 03:20:33      阅读:296      评论:0      收藏:0      [点我收藏+]

标签:nbsp   modal   view   designed   possibly   show   sign   anim   can   

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时,为什么会变成黑色背景。

标签:nbsp   modal   view   designed   possibly   show   sign   anim   can   

原文地址:http://www.cnblogs.com/penfree/p/6006249.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!