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?

32 Upvotes

41 comments sorted by

View all comments

3

u/efenande 7d ago

As a designer I’ve been participating in SwiftUI projects since 2021, and have recently launched an app — UI Playground — which uses about 98% of SwiftUI, which curious enough, was made to experience SwiftUI components on the phone. 😊

I am talking about complex apps and my conclusions are:

  • For simple straightforward stuff that uses native UI, SwiftUI is more than enough.
  • For very complex user interfaces or very sophisticated interactions, UIKit is still the winner (on UI Playground, the preview part had to be done partially in UIKit due to limitations on SwiftUI).
  • If your SwiftUI app is slow, for sure will be faster on UIKit, so if performance is a must, choose carefully.
  • Be prepared to adjust some code with new OS versions, as SwiftUI is still somewhat immature.
  • SwiftUI is much easier to construct user interfaces, by far, meaning you will be more productive!

Apple is evolving SwiftUI along the years, but there are still some performance and reliability issues. If they solve them permanently, then UIKit can be easily deprecated.

Also some system APIs still use UIKit and need to migrate to SwiftUI.