![](/img/trans.png)
[英]"viewWillTransitionToSize:" not called in iOS 9 when the view controller is presented modally
[英]willRotateToInterfaceOrientation not being called in a modally presented view controller
我的整個應用都是肖像。 當您在集合視圖控制器中點擊圖像時,我會以模態方式在MWPhotoBrowser視圖控制器中顯示圖像。 所以我想在那里支持多種方向。 我只支持iOS 6,並且有以下定位方法:
- (BOOL)shouldAutorotate {
return YES;
}
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskAllButUpsideDown;
}
這些被調用,但willRotateToInterfaceOrientation
和后續的willAnimateRotationToInterfaceOrientation
和didRotateFromInterfaceOrientation
永遠不會被調用。
它不會出現在導航控制器或任何東西中。 不知道我還需要做什么才能在模態顯示的視圖控制器中支持旋轉。
重新閱讀文檔后,我相信我的應用程序必須支持應用程序(plist)級別的橫向方向。 在這種情況下,我將不得不在我的其他視圖控制器中更改支持的方向以限制它我猜。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.