SwiftUI and Learning iOS Development
In my opinion the Python documents are some of the best documentation (if not the best) there is for a programming language. They’re simple, searchable. Functions are generally explained well with code examples and there’s a good tutorial found right on the home page with no effort required to find it. So I’ve always found it a bit of a struggle to read other language’s documentation. This has always been a road block for me personally in learning iOS development as well. Apple should really take note from the Python Software Foundation and up their game. They do have a very fine book for learning basic Swift and it’s great. But if you want to know more about their libraries and how to use them or just build a basic app then good luck
So in the past I’ve turned to books. For iOS I’ve tried iOS 12 programming for Beginners by Packt. It starts off good then the book and “starter projects” for chapters goes off the rails and attempt to recover haven’t gone well enough for me to continue. This is exacerbated by how Xcode projects are built out. Attempting to fix references and other bits always requires caution. There is also the new Beginning iPhone Development with Swift 5 which I was going to consider but again reviews say it’s riddled with bugs.
Perhaps my methods for finding information and learning a new programming language are out of date or other people are just happier to reach out to others. But in an attempt carry on in a way more to how I would like to learn I’ve recently decided to give the new SwiftUI tutorial on Apple’s site a try and I must say I’m really impressed. I’ve only got up to “Drawing Paths and Shapes” but the sections are laid out well, they work, you’re given a complete working example along with the starting out project. So far it’s just working fine.
The other thing I like so far is it’s primarily focusing on the UI side (no surprise given it’s for SwiftUI) and that’s what I want. As mentioned earlier they have a fine core Swift language book. I already feel I have enough knowledge I could make some basic apps.
What also helps is SwiftUI is more in line with what I want with regards to developing UIs. The syntax and the live preview are great and everything is in the code (more or less it seems as far as I can tell but I could be wrong). I wasn’t a fan of the old style UI designer and dragging and dropping things to connect them up. This new way feels is more me.
What will be left in the end is what else is available in Apple’s libraries and how best to use. Their documentation may not get better but that’s a better starting point and I’m happier having to reach out to others for those things rather than having to ask or crawl the web for the basics which has only been made worse for Swift because it’s changed a lot and quickly.
I’m also sure as it’s just released SwiftUI itself will change and improve, any framework this convenient will like have confusing error messages and have times when you need to roll up your sleeves and dig down past the convince but better to have to fight then than to fight from the first step.
I also hope this is a sign that Apple may start taking their documentation seriously. The less developers have to fight the software the more they can focus on writing great applications and the more likely they’ll use your solution than some website in a viewport or some solution that provides an inferior user experience.
And a little later…
The portion above was written some time ago. I’ve carried on and I’m still feeling the SwiftUI tutorial is solid and a great starting point. As I’ve gone on I’ve spotted a few minor errors in the site (the animation section is one that was off) but the great thing is the completed projects are all working. So if you hit a road block you still have the working solution. Due to how SwiftUI works and how well they’ve done the site anyway, you can typically find the difference by looking at files and finding the minor errors rather than doing a bulk copy / paste and praying it works; never really knowing what fixed it.