- Open the story board.
- Drag the Web View control from the right panel to the story board.
- Open ViewController.h file and add the following code in the @interface section:@property (weak, nonatomic) IBOutlet UIWebView *webBrowser;
- Open ViewController.m file and add the following code in the @implementation section:@synthesize webBrowser;
- In the ViewController.m file, add the following code in the viewDidLoad function:NSString *fullURL = @"http://www.google.com";NSURL *url = [NSURL URLWithString:fullURL];NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];[webBrowser loadRequest:requestObj];
- Open the story board.
- Right click-drag from the yellow view controller icon and drop it onto the Web View control.
- A popup will appear with several choices, select webBrowser.
- Done.
Monday, March 18, 2013
How to display a web page inside a form
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment