Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/121.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 不透明度仅保持一秒钟_Ios_Swift_Uistoryboard - Fatal编程技术网

Ios 不透明度仅保持一秒钟

Ios 不透明度仅保持一秒钟,ios,swift,uistoryboard,Ios,Swift,Uistoryboard,我想在UIViewcontroller中将背景视图的不透明度设置为40% 我已在情节提要中设置了不透明度: 它保持正确的不透明度约1秒,然后背景变为完全黑色 我没有在viewDidLoad或其他任何地方设置背景色 您还需要设置self.view.isOpaque=false和self.modalPresentationStyle=.overCurrentContext 在控制器的情节提要中,请参见以下屏幕截图: 有关视图的信息,请参见以下屏幕截图: 您还需要设置self.view.isOpa

我想在UIViewcontroller中将背景视图的不透明度设置为40%

我已在情节提要中设置了不透明度:

它保持正确的不透明度约1秒,然后背景变为完全黑色


我没有在
viewDidLoad
或其他任何地方设置背景色

您还需要设置
self.view.isOpaque=false
self.modalPresentationStyle=.overCurrentContext

控制器的情节提要中,请参见以下屏幕截图:

有关
视图的信息,请参见以下屏幕截图:


您还需要设置
self.view.isOpaque=false
self.modalPresentationStyle=.overCurrentContext

控制器的情节提要中,请参见以下屏幕截图:

有关
视图的信息,请参见以下屏幕截图: