推视图应该以透明的背景出现
我只是从一个angular度推动另一种观点。 这个代码后,推送的视图将显示为透明。 我已经使用过很多次了。 这是如此简单。
settings *set = [[settings alloc] initWithNibName:@"settings" bundle:nil]; set.view.backgroundColor = [ [UIColor blueColor] colorWithAlphaComponent:0.3f]; [self.navigationController pushViewController:set animated:YES ];
但是现在用最新的ios
和xcode
,推送视图不再变得透明。 所以如果有人有任何其他的解决scheme,那么请让我知道。
我已经提到了很多关于这个的post
- http://blog.typpz.com/2013/12/09/ios-sdk-create-a-pop-up-window/
- 在UIView上设置alpha将在其子视图上设置alpha,这不应该发生
- 自定义用户界面:iOS中的popup窗口Objective-C
- 在UIView上设置alpha将在其子视图上设置alpha,这不应该发生
并问了很多其他成员,但是无法解决这个问题。
您应该呈现您的view controller
而不是push
,因为推,你不能实现透明度,显示以前的视图控制器!
您可以debugging视图层次结构来检查顶视图和先前视图之间有多less视图。
要debugging视图层次结构,可以点击Debug View Hierarchy
button 从debugging区域!