- (voID)showModalVIEw{ UIStoryboard *storyboard = [UIStoryboard storyboarDWithname:@"Main" bundle:nil]; MySecVIEwController *mySecVIEwController = [storyboard instantiateVIEwControllerWithIDentifIEr:@"secController"]; mySecVIEwController.delegate = self; [self presentVIEwController:mySecVIEwController animated:YES completion:nil];}
然后在呈现的UIVIEwController中,方法vIEwWillTransitionToSize:withTransitionCoordinator:在iOS 8中调用但不在iOS 9中调用…
谢谢
解决方法 在您当前的视图控制器中,如果您覆盖了vIEwWillTransitionToSize:withTransitionCoordinator :,请确保您调用super.否则,此消息将不会传播到子视图控制器.对于Objective-C:
- (voID)vIEwWillTransitionToSize:(CGSize)size withTransitionCoordinator:(ID<UIVIEwControllerTransitionCoordinator>)coordinator { [super vIEwWillTransitionToSize:size withTransitionCoordinator:coordinator]; // Your other code ...
和斯威夫特:
overrIDe func vIEwWillTransition(to size: CGSize,with coordinator: UIVIEwControllerTransitionCoordinator) { super.vIEwWillTransition(to: size,with: coordinator) // Your other code ...}总结
以上是内存溢出为你收集整理的“viewWillTransitionToSize:”当视图控制器以模态显示时,在iOS 9中未调用全部内容,希望文章能够帮你解决“viewWillTransitionToSize:”当视图控制器以模态显示时,在iOS 9中未调用所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)