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

后端 未结 5 384
一生所求
一生所求 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:18

    Just make a mechanism that figures out if it is the first launch of the app, then tells your main view controller to add a (probably image) view on top of the current view with 0.6 alpha

    if (figureOutIfIsFirstLaunch)
    {
        UIImageView *myOverlay = [...];
        myOverlay.frame = self.view.bounds;
        myOverlay.alpha = 0.6;
        [self.view addSubview:myOverlay];
    } 
    

提交回复
热议问题