Follow along at https://www.hackingwithswift.com/100/26.
This day covers the final part of Project 4, Easy Browser
in Hacking with Swift.
I have a separate repository where I've been creating projects alongside the material in the book. However, I've also been tweaking the project further while going through the 100 Day challenge, and you can find that version of it in this directory.
With that in mind, the main focus of this day was extending the finished app according to a set of challenges.
If users try to visit a URL that isn’t allowed, show an alert saying it’s blocked.
Try making two new toolbar items with the titles Back and Forward. You should make them use
webView.goBack
andwebView.goForward
.
For more of a challenge, try changing the initial view controller to a table view like in project 1, where users can choose their website from a list rather than just having the first in the array loaded up front.