开发者

UIModalPresentationFormSheet on iPad in landscape mode

I created a UIViewController view from XIB with modalPresentationStyle set to UIModal开发者_如何学运维PresentationFormSheet and everything works great in portrait mode. When I switch to landscape the view gets moved upperleft (it's not centered as it should be) and most part of it is clipped.

Any ideas why this is happening and how to solve it?

Thanks


I had this problem as well. Turned out, I had the autorotate function set to Portrait for both the modal controller and the calling controller.


In iOS 7, to solve the problem of the modal view controller to appear to the left after apparition of the keyboard (problem that I have when I present an EKEventEditViewController in UIModalPresentationFormSheet, I do :

[self presentViewController:modalViewController animated:YES completion:^{
    modalViewController.view.superview.center = self.view.center;
}];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜