【发布时间】:2015-03-05 07:10:21
【问题描述】:
我有能力问这个问题,因为经过近 2 天的 Google 搜索、堆栈溢出等大型研究......
我的问题是这样的:我正在从我的主 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) 问题是当用户在我的应用程序状态栏中完成呼叫时,将其调整为正常大小,但 Modal VC 没有向上移动。
多亏了这个通知,我在代码中发生这种情况时就知道了:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(statuBarChange:) name:UIApplicationDidChangeStatusBarFrameNotification object:nil];
最糟糕的是帧是正确的并且原点仍然是(0,0)
有没有办法 refres modal 呈现的 vc ?没有解雇并再次呈现?
【问题讨论】:
-
你为什么投反对票?我写了这个问题来寻找和回答。模态 VC 和 inCall 状态栏呈现的行为没有任何相似之处。如果您投反对票,请解释原因,然后我可以与之相关。
标签: ios autolayout statusbar presentmodalviewcontroller in-call