WWDC22 SALE: Save 50% on all my Swift books and bundles! >>

SOLVED: Should I learn Swift or SwiftUI?

Forums > 100 Days of SwiftUI

I'm completely new to programming.

I've completed 12 days of 100 Days of Swift. And then I came across this Paul's video and this forum post which confused me whether or not to take the UIKit route.

Should I continue with learning Swift or start with day 15 of 100 Days of Swift UI? Please help me out.

1      

SwiftUI is Swift, but know you mean SwiftUI or UIKit. As you are new to this I would go with SwiftUI and be aware you might not be able to do something in SwiftUI as it a new language but you can always research that and if you compete 100 Days of SwiftUI you could then do the 100Days of Swift

2      

I agree with @Nigel.

I have tried several times to learn UIKit. I have taken courses from Angela @Udemy. I have followed a few years of Paul Hagerty's CS193p Swift course. These were great introductions, but I never could fully grep the entire UIKit architecture. XCode's Interface Builder looked wonderful, until I had to figure out contraint classes. Ugh.

SwiftUI changed all of that for me.

I found the declarative approach to building user interfaces much easier to understand. I think it's a more natural way to think of user interfaces and how the parts (buttons, sliders, graphics) all work together. Additionally, the functional nature of SwiftUI structs and classes provided additional comfort in learning and modifying features.

Some forum questions are specifically related to UIKit. I avoid answering those questions because, quite honestly, they are painful to read! I want to ask the writer, "Why aren't you doing this in SwiftUI?"

Here's an example: Help with TableViews
Just looking at this class' declaration hurts. So much easier using SwiftUI.

2      

Thank you @NigelGee, @Obelix. I think I'll take the SwiftUI path.

   

Done @Obelix, thank you.

   

Hacking with Swift is sponsored by Emerge

SPONSORED Optimize your app’s startup time, binary size, and overall performance using Emerge’s advanced app optimization and monitoring tools. Reliably measure app size, speed up your app's startup time with Emerge's Launch Booster, and much more. Emerge is actively used by many of the top mobile development teams in the world.

Find out more

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.