How do I fade/dim the background of my app while k

2019-09-02 01:15发布

This question already has an answer here:

Take this Tweetbot 3 screenshot:

enter image description here

How do I present a view and fade out ALL the back views except the one in front to a dark colour?

1条回答
你好瞎i
2楼-- · 2019-09-02 01:49

Create a full screen UIView with background color as [UIColor colorWithRed:0.f green:0.f blue:0.f alpha:0.5f]and add your custom view as subView of this new view and then based on your needs you can present this new UIView on top of your current screen which will look faded out except for main centric view.

查看更多
登录 后发表回答