How do I make a semi-transparent view layer above a current view?

后端 未结 5 459
一生所求
一生所求 2021-02-01 19:28

You\'ve likely seen this before, its become exceedingly popular in consumery chic apps like ScoutMob. I\'m trying to implement a 60% transparent view on launch that will cover m

5条回答
  •  你的背包
    2021-02-01 20:16

    Swift 4 update

     view.isOpaque = false  
    
     view.backgroundColor = UIColor.black.withAlphaComponent(0.2)
    

    This option available in storyboard . Make sure to uncheck the Opaque option

提交回复
热议问题