Ok, I have been building Swift applications since the week after Apple introduced it in 2014. During that time I have developed frameworks to simplify GUI creation for macOS, iOS and tvOS. But since I hate the concept of AutoLayout my framework works differently (but well). Frame based control layout is fine for macOS and tvOS, but gets more complex with iPhone/iPad as there are over 14 different device sizes.
So that being said, I figured I’d try an learn SwiftUI for GUI building. I don’t need to learn the “language” part, by this I mean the part NOT related to GUI as I’m guessing that that is 99.99% identical to the standard Swift.
So…..what would be my best course of action? What has anyone done?
There’s also Auto Layout by Tutorials | Kodeco which looks like a good book that I’m planning to purchase, once I get through my backlog of other material to consume.
Hi Dave! I learned SwiftUI by first using an app named DetailsPro to build a prototype of a UI for an app I wanted to build, then examining its generated SwiftUI code, but there was only so much I could do with DetailsPro. Next, I read books on SwiftUI such as Paul Hudson’s books and Big Mountain Studio’s books. I also participated in a web-based course called iPhone Apps 101 by Paul Solt.
But what really got me started was just digging in and building small SwiftUI components in SwiftUI Playgrounds, then combining them in an Xcode project. I was able to get immediate visual feedback about my UI without rebuilding my project — until I added environmental data that persisted across views. The SwiftUI canvas in Xcode couldn’t handle it, so I had to start building the project to see UI changes after that.
Thanks… I’ve skimmed a few tutorials, and can’t get past the fact that the common thread seems to to use VStacks, HStacks and ZStacks, which to me just feel like containers that have no real anchor and are a lame replacement for AL. I’m coming from a mind-set where I can put a control on the screen, alter its size based on the device, set it postion based on device etc. And I do not mean a size and postion relative to a template device.
I looked at Hudson’s 100 Days, but the first 50 days seemed to be non-Gui stuff that I already know
I prefer Paul Hudsons books and videos (ie ‘hacking…’). Some very good stuff comes from ‘swiftfull thinking’ (Nick Sarno), other things are explained perfect by Sean Allen (he’s the one who said ‘don’t try to get everything in Your head’). So, I’m using a mix. I got a pro version of Youtube, just because of my learnings…
There are others with very good tutorials, but as a first place, I check Paul Hudsons stuff and Nick Sarno for principles