I ran into a situation on the job where I needed to display some legal text. This isn't uncommon in a corporate environment but the text they wanted to use was just huge. It was really long and it needed to be in a place where other content was displayed.
After a few 30 minutes and figuring out that the legal text couldn't be paired down it dawned on me that we could link to the legal text AND put it in a place that could be easily changed as legal stuff tends to do. So this was the perfect opportunity to play with the WebView, something that I had not crossed paths with, and thankfully, it turns out it is pretty easy to implement.
Here are the steps
- Create a new project.
- Add a button to the Main view and add a seque.
- Add a new Web view with the web view and nav button to segue back.
- Add a web view controller
- Add some code.
Here is the video....
Here is the code in the web view controller
And here is a link to the project.