我正在使用webview在iOS7中遇到麻烦。它显示了我的webview和tabbar之间的空白区域。 以下是我的场景镜头和代码。请帮帮我。
- (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];
}
答案 0 :(得分:0)
我解决了这个问题,添加了以下代码:
if ([self respondsToSelector:@selector(edgesForExtendedLayout)])
{
self.edgesForExtendedLayout = UIRectEdgeNone;
}