Swift, SwiftUI, and UIKit 101 question

Forgive the ignorance but I jumped into learning Swift code not knowing that there is a difference between Swift code, SwiftUI, and UIKit. I understand only that Swift is a programming language with its own syntax but also with a connection to the old Objective - C. Can someone explain (as if to a 5th grader) what is SwiftUI, and UIKit? I see the word framework tossed around a lot, but i am not sure I completely understand the concept.

I thought my only challenge would be to learn the Swift language before I could build rudimentary apps to practice and grow my learning.

If these things are separate from each other, in what order should one learn to code?

Swift is the programming language. It’s not “connected” to Objective-C, but before Swift apps used the programming language Objective-C instead.

SwiftUI and UIKit are both frameworks for building the UI, user interface, of your app. Framework meaning Apple wrote a bunch of code so that we, developers, don’t have to think of each little thing for how something works.

Like you tap a button and it prints “hi”
You only have to write to print hi, and write the button.

UIKit / SwiftUI handled the fact that it detected the user tapped the button (and think tapped it vs long press) YOU as the dev didn’t have to think about how to I know when a button was tapped. You only need to code “oh the button was tapped, okay print ‘hi’”

That’s what a framework does, it’s handling other functionality behind the scenes so you can really focus on what matters

You will learn Swift, the programming language no matter what. But whether to build apps using SwiftUI or UIKit, it depends on your goals.

If you’re just learning for fun, learn SwiftUI, if your goal is to get a job in the next 6 months, learn UIKit (that’s my opinion, but others say you can just learn SwiftUI, and learn UIKit whenever you need it)

But it all depends on your goals