I am writing this in viewDidLoad,
// 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];
The web view created here does not align itself to portrait and landscape orientations properly, whereas if the web view is created through Interface Builder, it works fine.
(Not sure if something wrong with initWithFrame:self.view.frame)
What could be the problem?