The first week of Turing ios training (using UIWebView to create a simple browser), iosuiwebview
By giving new students the opportunity to train ios, we will bring a series of new knowledge blogs to new ios beginners, hoping to help ios enthusiasts and children's shoes who want to enter the ios field. If you pass by, please advise.
Small exploration before class
Make a simple browser
First open Xcode and create a new project.
Open main. Storyboard click View Control
Remove UseAuto Layout and Use Size Classes (the new version of Xcode auto Layout is unfriendly, so you need to remove the check mark after each project is created)
Enter the following in the search box on the toolbar:
Drag a webView to the scene:
Click the scenario configurator.
Click UIWebView and drag it to connect to ViewController. h.
Will appear
Enter the web in the Name box to associate the control with the declaration file.
Enter the following code in the ViewController. m file:
Click "run" and a simple browser will be OK.