Skip to content

Blog · Building an app

SwiftUI or UIKit?

By Shahid Hussain, senior mobile & web engineer ·

For a new iPhone app in 2026, I start in SwiftUI and reach for UIKit only where SwiftUI still falls short. Most of my work as a freelance iOS developer is SwiftUI. It isn’t an either-or choice: the two mix in one app, so the question is which one leads.

What SwiftUI does that UIKit can’t

  • Widgets are built with SwiftUI views through WidgetKit, and so are Live Activities on the Lock Screen and in the Dynamic Island (Apple).
  • One codebase across Apple’s platforms: the same views run on iPhone, iPad, Mac, Apple Watch and Vision Pro, with platform tweaks.
  • Less code for the same screen: layouts, state and animation are declared, not wired by hand, so screens are quicker to build and to change.

Where UIKit still earns its place

  • Rich text editing and other text work beyond what SwiftUI’s text views offer.
  • Very custom scrolling and list layouts, where you need control over every cell and every offset.
  • Large existing UIKit apps, where rewriting working screens buys nothing.
  • Libraries that only ship UIKit views, such as some SDKs for maps, video or ads.

Mixing the two

  • UIViewRepresentable and UIViewControllerRepresentable put a UIKit view inside a SwiftUI screen.
  • UIHostingController puts a SwiftUI view inside a UIKit app.

So an existing UIKit app doesn’t need a rewrite: new screens can be SwiftUI, one at a time, while the old ones keep working.

The iOS versions you support decide a lot

Each iOS release adds SwiftUI features, and an app can only use the ones its oldest supported iOS has. Supporting the last two or three versions usually covers most iPhones in use; Apple publishes how many devices run each version (Apple). Supporting much older versions means more workarounds, in SwiftUI especially.

Performance

SwiftUI is fast when views stay small and state lives close to where it’s shown. It slows down when one change redraws a whole screen, when long lists aren’t lazy, or when items lack stable identity. Why is my app slow? covers how to find which one it is.

For an existing app

If your app is UIKit and works, keep it, and build new screens in SwiftUI. If it’s SwiftUI and slow or crashing, the fix is usually in how state flows through the views, not a move back to UIKit. And if you also need Android, see Flutter or native.

About the author

Shahid Hussain is a senior mobile & web engineer in Islamabad, Pakistan (UTC+5), with 27+ apps shipped to production in SwiftUI, Flutter, React and Next.js, for Zavi Technology and independent clients.