Guide · Updated November 2026

SwiftUI vs UIKit: which should you use for your iPhone app?

SwiftUI and UIKit are Apple’s two ways to build the screens of an iPhone app. For a new app in 2026, SwiftUI is usually the right starting point, with UIKit added where it still does a better job. This guide explains the differences in plain English, with code, so you can make the right call for your project.

  • Plain-English comparison
  • Real code side by side
  • Written by iOS developers

Quick answer: choose SwiftUI for a new iPhone, iPad, Mac or Apple Watch app. It needs less code, shares that code across Apple devices, and is the only way to build widgets, Live Activities and modern Apple Watch apps. Choose UIKit for parts that need very fine control, such as advanced text editors, complex custom layouts or heavy camera and media screens, and when you’re maintaining an existing UIKit app. Most professional apps today use both: SwiftUI for most screens, with UIKit added where it helps.

The basics

What are SwiftUI and UIKit?

Both are Apple frameworks for drawing screens, handling taps and moving between pages. The difference is how you describe the interface.

SwiftUI (2019 onwards)

A declarative framework. You describe what the screen should look like for the current data, and SwiftUI updates the screen whenever the data changes. It runs on iPhone, iPad, Mac, Apple Watch, Apple TV and Vision Pro, and Apple builds most of its new features for it first.

UIKit (2008 onwards)

An imperative framework. You create views and controllers and tell them step by step what to change when something happens. It has powered iPhone apps since the first App Store, is extremely mature, and runs on iPhone, iPad, Apple TV and on the Mac through Catalyst.

On the Mac, the older equivalent of UIKit is AppKit. See our Mac app development page for how we choose between SwiftUI, AppKit and Catalyst.

Comparison

SwiftUI vs UIKit at a glance

SwiftUIUIKit
StyleDeclarative: describe the resultImperative: give step-by-step instructions
Amount of codeMuch less for standard screensMore code, more manual wiring
Speed of buildingFaster, with live previews in XcodeSlower for standard screens, predictable for complex ones
Fine controlGood and improving each yearComplete control over every pixel and gesture
Apple devicesiPhone, iPad, Mac, Watch, TV, Vision ProiPhone, iPad, Apple TV, Mac through Catalyst
Widgets and Live ActivitiesYes, SwiftUI is requiredNo
Apple Watch appsYes, the standard way todayNo
New Apple featuresUsually arrive here firstStill updated, but fewer new features
Older iOS versionsBest on recent iOS versionsWorks the same on very old iOS versions
Existing code and librariesGrowing quicklyFifteen-plus years of answers, libraries and patterns
Code

The same screen in SwiftUI and UIKit

Here is a simple list of orders with a title and pull-to-refresh, written both ways. The SwiftUI version is about a third of the length, which is typical for standard screens.

OrdersView.swift · SwiftUI
import SwiftUI

struct OrdersView: View {
    @State private var orders: [Order] = []

    var body: some View {
        NavigationStack {
            List(orders) { order in
                Text(order.title)
            }
            .navigationTitle("Orders")
            .refreshable { orders = await api.orders() }
            .task { orders = await api.orders() }
        }
    }
}
OrdersViewController.swift · UIKit
import UIKit

final class OrdersViewController: UITableViewController {
    private var orders: [Order] = []

    override func viewDidLoad() {
        super.viewDidLoad()
        title = "Orders"
        tableView.register(UITableViewCell.self,
            forCellReuseIdentifier: "cell")
        refreshControl = UIRefreshControl()
        refreshControl?.addTarget(self,
            action: #selector(reload), for: .valueChanged)
        reload()
    }

    @objc private func reload() {
        Task {
            orders = await api.orders()
            tableView.reloadData()
            refreshControl?.endRefreshing()
        }
    }

    override func tableView(_ tableView: UITableView,
        numberOfRowsInSection section: Int) -> Int {
        orders.count
    }

    override func tableView(_ tableView: UITableView,
        cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let cell = tableView.dequeueReusableCell(
            withIdentifier: "cell", for: indexPath)
        var content = cell.defaultContentConfiguration()
        content.text = orders[indexPath.row].title
        cell.contentConfiguration = content
        return cell
    }
}

Less code means less to write, test and maintain. But the UIKit version gives direct control over every step, which matters on complex screens.

One SwiftUI codebase running on iPhone, iPad, Mac and Apple Watch
SwiftUI

When SwiftUI is the better choice

  • New apps. Most new iPhone apps can be built mainly in SwiftUI, and they’re faster to build and easier to change later.
  • Apps on several Apple devices. The same SwiftUI views and logic can be shared with iPad, Mac, Apple Watch and Vision Pro versions, with small changes for each screen size.
  • Widgets, Live Activities and the Lock Screen. These can only be built in SwiftUI, so you’ll need it anyway.
  • Apple Watch and Vision Pro apps. SwiftUI is the standard way to build for both.
  • Apps that change often. Live previews and less code make design changes and new features quicker.
  • Modern Apple frameworks. SwiftData, the Observation framework, App Intents and Swift Charts all fit most naturally with SwiftUI.
UIKit

When UIKit still wins

SwiftUI covers more every year, but UIKit is still the better tool for some jobs:

  • Advanced text editing. Rich text editors, code editors and anything that needs precise control over typing and selection.
  • Very complex or unusual layouts. Huge scrolling grids, custom transitions and gestures that need exact, frame-by-frame control.
  • Camera, video and drawing tools. Custom capture screens, editors and canvases often build on UIKit views.
  • Supporting much older iOS versions. If many of your users are on old devices, UIKit behaves the same across versions.
  • Large existing UIKit apps. A mature app with years of UIKit code shouldn’t be rewritten just to follow the trend.
  • Some third-party SDKs. A few payment, mapping and video SDKs still provide UIKit views first.

None of this means choosing UIKit for the whole app. In most cases, only one or two screens need it.

Hybrid apps

Using SwiftUI and UIKit in the same app

Apple designed the two to work together, so you don’t have to pick one forever.

  • SwiftUI inside UIKit: wrap a SwiftUI screen in a UIHostingController and show it like any other UIKit screen. This is how most teams add SwiftUI to an existing app.
  • UIKit inside SwiftUI: wrap a UIKit view in UIViewRepresentable, or a whole controller in UIViewControllerRepresentable, and use it like a SwiftUI view.
  • SwiftUI in table and collection cells: UIHostingConfiguration lets UIKit lists show SwiftUI cells.
Hybrid.swift
// A SwiftUI screen inside a UIKit app
let settings = UIHostingController(
    rootView: SettingsView())
navigationController?.pushViewController(
    settings, animated: true)

// A UIKit text view inside SwiftUI
struct NotesEditor: UIViewRepresentable {
    @Binding var text: String

    func makeUIView(context: Context) -> UITextView {
        UITextView()
    }
    func updateUIView(_ view: UITextView,
                      context: Context) {
        if view.text != text { view.text = text }
    }
    // A Coordinator sends edits back to SwiftUI
}
Existing apps

Should you rewrite a UIKit app in SwiftUI?

Usually not all at once. A full rewrite can cost almost as much as building the app again, and it adds risk without giving users anything new. A gradual move works better:

1
Week 1–2

Review the app

Check the code, the iOS versions you support and which screens change most often.

2
Ongoing

New screens in SwiftUI

Build every new feature in SwiftUI and show it with a hosting controller.

3
As needed

Move busy screens

Rewrite the screens you change most, such as settings, forms and onboarding.

4
When ready

Add widgets and Watch

Use the shared SwiftUI code for widgets, Live Activities or an Apple Watch app.

5
Optional

Keep stable UIKit

Leave complex, working UIKit screens alone unless there’s a real reason to change them.

6
Monthly

Keep it current

Update for each new iOS release so the app keeps working and looks right.

Decision guide

SwiftUI or UIKit: how we choose for your project

Most new apps

SwiftUI first

New iPhone or iPad app

SwiftUI for almost every screen, with UIKit added only where a screen needs it.

SwiftUI everywhere

Watch, widgets, Vision Pro

Apple Watch apps, widgets, Live Activities and visionOS apps are built in SwiftUI.

Hybrid

Existing UIKit app

Keep the working UIKit code and add new features in SwiftUI, screen by screen.

Mostly UIKit

Specialist apps

Text editors, pro camera or drawing apps, or apps that must support very old iOS versions.

The framework rarely changes the price much on its own. What matters more is the number of screens and features. See our iOS app development cost guide for typical prices, from US$10k–25k (about A$15k–38k) for an MVP.

FAQ

SwiftUI vs UIKit FAQ

Is SwiftUI better than UIKit?

For most new apps, yes. SwiftUI needs less code, works across all Apple devices and gets Apple’s newest features first. UIKit is still better for a few specialist screens, such as advanced text editors and complex custom layouts, and for maintaining existing UIKit apps.

Is UIKit deprecated?

No. Apple still supports and updates UIKit every year, and SwiftUI itself relies on it behind the scenes on iPhone and iPad. Apple’s newest features usually arrive in SwiftUI first, though.

Can I use SwiftUI and UIKit in the same app?

Yes, and most professional apps do. UIHostingController puts SwiftUI screens inside a UIKit app, and UIViewRepresentable puts UIKit views inside SwiftUI.

Is SwiftUI ready for production apps?

Yes. Many large apps, including Apple’s own, use SwiftUI in production. It’s most mature on recent iOS versions, so it works best when your app supports the last two or three releases.

Is SwiftUI faster to develop with?

For standard screens such as lists, forms, settings and detail pages, usually yes, because there’s less code and Xcode shows live previews. For highly custom screens, the difference is smaller.

Does SwiftUI or UIKit perform better?

For most apps, users won’t notice a difference. UIKit can be tuned further for very large lists or heavy animations, and those are the screens where we sometimes use it.

Should I rewrite my UIKit app in SwiftUI?

Usually not all at once. Build new features in SwiftUI, move the screens you change most often, and leave stable UIKit screens alone. That way you get SwiftUI’s benefits without paying for a full rewrite.

Which should a new app use in 2026?

Start with SwiftUI and add UIKit only where a screen needs it. That gives you the fastest build, shared code for iPad, Mac and Apple Watch, and access to widgets and Live Activities.

Related

Planning an iPhone app?

See what we build on our iOS app development page, compare costs in the iOS cost guide, or look at Apple Watch, iPad and Mac apps built with SwiftUI. Weighing up cross-platform? Read native iOS vs Flutter.

Not sure which framework fits your app?

Tell us about your idea or your existing app. We’ll recommend an approach and send a free, fixed-price estimate.

Talk to an iOS developer