Handling In-Call Status Bar with Custom Modal Presentation

后端 未结 5 847
甜味超标
甜味超标 2021-01-30 13:25

The Problem

I\'ve noticed some strange behavior when presenting a UINavigationController (with a root view controller, already pushed, naturally) with

5条回答
  •  长情又很酷
    2021-01-30 14:20

    Here is a workaround I put in my app delegate that fixed the problem for me:

    - (void)application:(UIApplication *)application willChangeStatusBarFrame:(CGRect)newStatusBarFrame
    {
        if (newStatusBarFrame.size.height < 40) {
            for (UIView *view in self.window.subviews) {
                view.frame = self.window.bounds;
            }
        }
    }
    

提交回复
热议问题