Some of the code isn't pleasant to work with, and certainly I wish iOS would just figure out text view insets automatically for keyboards, but you're through it now so your project is done. Even though this was a hard project, I did cut quite a few corners in this project to make the code as easy as possible, so again I want to encourage you to try creating another extension and see how Apple's example code is different from mine.
If you'd like to make improvements to this project, you could try combining a number of techniques together to make a pretty awesome app.
You're already receiving the URL of the site the user is on, so why not use
URL object in order to use its
If you wanted to be really fancy, you could let users name their scripts, then select one to load using a
You finished another project, and I'm glad Hacking with Swift helped you. Now I need your help. Please take just a moment out of your day to tell others about Hacking with Swift so they can benefit too.
You can click below to post a tweet straight to this project. Or if you're feeling particularly generous, you can click here to link to Hacking with Swift on your website and help spread the word.
Thank you. Your support is what keeps me going!
Paul Hudson is the creator of Hacking with Swift, the most comprehensive series of Swift books in the world. He's also the editor of Swift Developer News, the maintainer of the Swift Knowledge Base, and Mario Kart world champion. OK, so that last part isn't true. If you're curious you can learn more here.
Become a Swift guru
I wrote a book called Pro Swift that's dedicated to helping you master the Swift language, and it includes seven hours of video demonstrating each technique!