【发布时间】:2012-11-28 17:58:49
【问题描述】:
我正在开发一个 iPad 应用程序,当用户通过登录表单进行身份验证时,它将以模态方式在 UIWebView 中加载网页。这很好用,但是当我将设备旋转到横向模式时,webview 只覆盖了 75% 的屏幕:
这是来自我的登录视图控制器的代码:
// Load storyboard for easy instatiation of the login view controller
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPad" bundle:nil];
WebViewController *webController =
(WebViewController *)[storyboard instantiateViewControllerWithIdentifier:@"WebView"];
// Present the embedded browser in fullscreen.
[webController setModalPresentationStyle:UIModalPresentationFullScreen];
[self presentViewController:webController animated:YES completion: nil];
【问题讨论】:
-
注意,如果你的app只做这个(登录后显示一个UIWebView),提交到App Store会被Apple拒绝。
标签: ios ipad uiwebview landscape