Your app can display a web page by using the Web View object on your user interface and then by writing three lines of code. So first, place a Web View on your user interface and give it a unique name such as webView, although the exact name isn’t important.
Next, create a variable or constant using any name you wish. Then set this variable/constant to a string that defines the complete web site address like this:
The only restriction is that the web site address must use https:// and not just plain http:// or else it won’t work.
After creating a variable/constant to represent the web site address, you need to create a second variable/constant to request the web site address, known as a URL:
Finally you need to use the loadRequest method on your Web View to request a particular web site domain address:
So the complete code to work with a Web View object on your user interface looks like this:
Just paste a different string for the web site address and you’ll be able to display a different web site. Remember, make sure the web site address uses https:// and also make sure the web site is optimized for mobile devices so it adapts to the smaller screen of an iPhone or iPad.