且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

背景颜色的alpha不适用于iOS

更新时间:2021-12-27 22:12:08

如果您使用故事板并使用segue呈现视图控制器,则演示文稿显示带有透明背景的视图控制器的segue属性应该全屏显示,如附件所示。

If you are using storyboard and present view controller using segue, the presentation attribute of segue that show you view controller with transparent background should be over full screen as shown in attachment.

然后在视图控制器中设置背景颜色:

Then in your view controller set the background color by using this :

self.view.backgroundColor = UIColor(white: 0, alpha: 0.4)