我在iPad上使用UIWebView,我通过下面的代码进行初始化。问题是,视图不会显示在状态栏下方的页面顶部,但还有另一个44像素的空间(填充黑色) - 对于导航栏,我不想显示。任何提示如何使UIWebView在没有44px空间的情况下显示?在iPad上的UIWebView大小
非常感谢,
BR
斯登
- (void)viewDidLoad
{
[super viewDidLoad];
CGRect rectApp = [[UIScreen mainScreen] applicationFrame];
self.webView = [[[UIWebView alloc] initWithFrame:rectApp] autorelease];
self.webView.backgroundColor = [UIColor whiteColor];
self.webView.scalesPageToFit = YES;
self.webView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
self.webView.delegate = self;
[self.view addSubview: self.webView];
[self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.test.com/shop/index.php"]]];
}
谢谢!它完美的作品。 – STeN 2010-07-09 03:22:46