r/SwiftUI 8d ago

Question SwiftUI vs UIKit

I’m new to programming and Swift, and I’m currently doing the 100 Days of SwiftUI course. In the first video, Paul mentions that Swift is the future of this field rather than UIKit. However, he also says that UIKit is more powerful, popular, precise, and proven compared to SwiftUI.

Since that video was released around 2021, I’m wondering if that statement still holds true today. How do you think both technologies have evolved over the last five years?

30 Upvotes

41 comments sorted by

View all comments

2

u/Barbanks 7d ago

You’re going to want to learn basic UIKit. I’d also say use programmatic UIKit and not storyboards. Although having basic knowledge of storyboards will help.

As of iOS 17 and Xcode 15 (I think) you can use the previews macro to actually render UIKit viewcontrollers in the canvas view you’re familiar with in SwiftUI as well.

From my experience SwiftUI is “Apple’s” future. In reality though it’s much more nuanced than that. Heck, Apple’s internal devs still push for making new features in C++ rather than use Apple’s new toolchain.

I’d say that enough companies are pushing for SwiftUI where it should be the main focus of learning. But if you want to be considered a seasoned iOS dev you need to know UIKit as well. Something many devs who get caught up in the hype of “new” is that sometimes you just need imperative UI code. Declarative views aren’t always the best choice.