我在viewDidLoad中写这篇创建,的UIWebView通过IB,并通过代码不定向友好
// Programmatically creating uiwebview.
UIWebView *webVPrg = [[UIWebView alloc] initWithFrame:self.view.frame];
NSURL *url = [NSURL URLWithString:@"http://www.google.com"];
NSMutableURLRequest *urlReq = [[NSMutableURLRequest alloc] initWithURL:url];
[self.view addSubview:webVPrg];
[webVPrg loadRequest:urlReq];
这里创建本身不对齐纵向和横向正确,Web视图如果Web视图是,而通过Interface Builder创建,它工作正常。
(不知道什么问题initWithFrame:方法self.view.frame)
可能是什么问题呢?
用于反对投票的LOL。有比这更糟糕的问题。 – esh