我在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