0

我正在使用 webview 在 iOS7 中遇到问题。它显示了我的 webview 和标签栏之间的空白区域。以下是我的截图和代码。请帮助我。

- (void)viewDidLoad {
    [super viewDidLoad];

    CGRect rectFrame = [UIScreen mainScreen].applicationFrame;
    self.view.frame = rectFrame;
    self.view.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;

    // demoWebview is my Webview 
    demoWebView.autoresizesSubviews = YES;
    demoWebView.scalesPageToFit = YES;
    demoWebView.backgroundColor = [UIColor whiteColor];

    UIBarButtonItem *backButton = [[UIBarButtonItem alloc]initWithTitle:@"Back" style:UIBarButtonItemStyleBordered target:self action:@selector(onBack:)];
    self.navigationItem.leftBarButtonItem = backButton;
    [backButton release];

}
4

1 回答 1

0

我通过添加以下代码解决了这个问题:

if ([self respondsToSelector:@selector(edgesForExtendedLayout)]) 
{
    self.edgesForExtendedLayout = UIRectEdgeNone;
}
于 2013-12-20T05:19:49.017 回答