Overlay a view over whole screen, when using UITabBarController?

后端 未结 5 574
渐次进展
渐次进展 2021-02-08 02:13

I want to overlay a HUD-style transparent graphic over the entire screen in a UITabBarController setup. The button to do this is in the first tab\'s screen (FirstViewController)

5条回答
  •  名媛妹妹
    2021-02-08 02:51

    The above solution by Henrik P. Hessel is Good but there is one problem with that solution. The problem is already mentioned by elsurudo in the comment below the Answer.

    The problem I have with this solution is that the overlay comes up upside-down, and does not rotate.

    I faced the same problem and I tried different things and I got one solution to eliminate that problem.

    The solution is simple. You can add that myNewView to UITabBarController's view.

    [self.tabBarController.view addSubview:myNewView];
    

    Hope, it will be useful for future visitors.

提交回复
热议问题