由于经过了长达2天的谷歌搜索、Stack Overflow等大量研究,我才敢提出这个问题...
我的问题是:我想要从我的主ViewController中呈现另一个ViewController,代码如下:
UINavigationController *navigation = [[UINavigationController alloc] initWithRootViewController:VController];
navigation.transitioningDelegate = self;
navigation.modalPresentationStyle = UIModalPresentationCustom;
[self presentViewController:navigation
animated:YES
completion:nil];
每当iPhone用户通话或将其手机用作热点时,状态栏都会放大,将我的模态显示VC推到底部,但原点设置为(0;0)。问题在于,当用户在我的应用程序中完成通话时,状态栏会调整为普通大小,但模态VC不会向上移动。
我是通过此通知在代码中了解到这一情况的:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(statuBarChange:) name:UIApplicationDidChangeStatusBarFrameNotification object:nil];
最糟糕的情况是框架正确,但是原点仍然是(0,0)
有没有一种方法可以刷新模态呈现的视图控制器?而不需要解除显示并再次呈现它?