Update: I have recreated the same steps with a new project targeting iPhone and this time it works; I tried again with iPad only project it doesn't! That's weird isn't it ?
Update2: I found why. I saw blank because I put default webview size control and I can see something only if I rotate the iPad simulator :(
==== In xib file I have drag and drop a UIWebView control in my single view app for IPAD Simulator
I drag and drop from the control to file owner to set the delegate I drag and drop from the file owner to set webView in referencing Outlets
In code I have
// h file
@interface myViewController : UIViewController {
IBOutlet UIWebView *webView;
}
@property(nonatomic,retain)IBOutlet UIWebView *webView;
@end
// m file
#import "myViewController.h"
@interface myViewController ()
@end
@implementation myViewController
@synthesize webView;
- (void)viewDidLoad
{
[super viewDidLoad];
// try following complete url
NSString *urlString = @"http://www.google.com";
NSURL *url = [NSURL URLWithString:urlString];
NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url];
[webView loadRequest:urlRequest];
}
- (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return YES;
}
@end