Day 26
Day 26 ๊ด๋ จ
Project 4, part three
Youโve completed another project now, and I hope youโre now starting to realize how little code it takes to make iOS projects come to life.
But weโre not done yet. Itโs really important that you take the time to review what you learned to make sure itโs sunk in, and to test out that learning with some challenges.
Thereโs a Korean singer called Kwon Ji-yong โ better known by the awesome stage name G-Dragon โ who said, โyou have to believe in yourself, challenge yourself, and push yourself until the very end; that's the only way you'll succeed.โ
And heโs right: I want you to succeed, but I also want to set you free a little to so you can try (and fail a little!) on your own. Sometimes figuring out all the wrong paths is as important as figuring out the right paths.
Today you should work through the wrap up chapter for project 4, complete its review, then work through all three of its challenges.
Wrap up
Wrap up
Thatโs another project done, and another huge collection of things learned. You should be starting to get into the swing of things by now, but don't let yourself become immune to your achievements.
In this tutorial alone you've learned about loadView()
, WKWebView
, delegation, URL
, URLRequest
, UIToolbar
, UIProgressView
, KVO and more, so you should be proud of your fantastic accomplishments!
Review what you learned
Anyone can sit through a tutorial, but it takes actual work to remember what was taught. Itโs my job to make sure you take as much from these tutorials as possible, so Iโve prepared a short review to help you check your learning.
Click here to review what you learned in project 4.
Challenge
One of the best ways to learn is to write your own code as often as possible, so here are three ways you should try extending this app to make sure you fully understand whatโs going on:
- 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 and webView.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.
Tip: Once you have completed project 5, you might like to return here to add in the option to load the list of websites from a file, rather than having them hard-coded in an array.
Wrap up - Additional
Once youโre done, tell other people: youโve built a web browser for iOS, youโve passed the test, and youโve even extended it with your own code.
You should be proud of what youโve accomplished โ well done!