小编Shi*_*ial的帖子

iOS in-call状态栏更新viewcontroller在屏幕上呈现modaly

我有能力提出这个问题,因为经过大量的研究,几乎2天的谷歌搜索,Stack Overflowing等......

我的问题是:我从我的主ViewController呈现ViewController,如下所示:

UINavigationController *navigation = [[UINavigationController alloc] initWithRootViewController:VController];
navigation.transitioningDelegate = self;
navigation.modalPresentationStyle = UIModalPresentationCustom;

[self presentViewController:navigation
                   animated:YES
                 completion:nil];
Run Code Online (Sandbox Code Playgroud)

无论何时iPhone用户正在通话,或者正在使用他或她的手机作为热点,状态栏都会被放大,将我的模拟显示VC推到底部,但原点设置为(0; 0)问题是用户在完成呼叫期间他在我的应用程序状态栏调整到正常大小,但Modal VC没有向上移动.

在此输入图像描述

感谢此通知,我在代码中发现了解这一点:

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(statuBarChange:) name:UIApplicationDidChangeStatusBarFrameNotification object:nil];
Run Code Online (Sandbox Code Playgroud)

最糟糕的是框架是核心,原点仍然是(0,0)

有没有办法反映模态提出的vc?没有解雇并再次提出它?

statusbar presentmodalviewcontroller ios in-call autolayout

8
推荐指数
1
解决办法
807
查看次数