Create a Web View App Step-by-Step
Step 1 Create a new project in XCode using the "Single View Application" option.
Step 2 Modify “viewcontroller.h” ViewController : UIViewController { IBOutlet UIWebView *webDisplay; UIWebView
Step 3 Create the User Interface Double click on MainStoryboard.storyboard and open it to Interface Builder. Drag "Web View" from the library and place into view. Connect the UIWebView code to the Web View GUI.
Step 4 Open ViewController.m In viewDidLoad we will create a URL request object and load the request in the UIWebView.
Step 4 – Add the following code - (void)viewDidLoad { NSString *urlAddress NSURL *url = [NSURL URLWithString:urlAddress]; NSURLRequest *requestObj = [NSURLRequest requestWithURL:url]; [webDisplay loadRequest:requestObj]; [super viewDidLoad]; }
Step 5 Compile your application and run in the Simulator.