The Current State of iOS UI Development

Apple introduced SwiftUI at WWDC 2019 as a modern, declarative framework for building user interfaces across all Apple platforms. Four years later, the iOS development community remains divided on when to use SwiftUI versus the mature, battle-tested UIKit. This is not just an academic debate. The choice between these frameworks significantly affects development speed, app performance, team hiring, and long-term maintainability.

At StrikingWeb, we have shipped iOS applications using both frameworks, and increasingly, applications that use both together. This article shares our practical assessment of each framework's strengths and limitations as of 2023, and provides guidance for making the right choice for your project.

Declarative vs Imperative: Understanding the Paradigms

The fundamental difference between SwiftUI and UIKit is their programming paradigm. UIKit is imperative: you explicitly tell the framework what to do at each step. Create a label, set its text, add it to a view, position it with constraints, and update it when data changes. You manage the UI state yourself, and you are responsible for keeping the visual representation in sync with the underlying data.

SwiftUI is declarative: you describe what the UI should look like for a given state, and the framework handles the rendering and updates. When your data changes, you modify the state, and SwiftUI automatically re-renders the affected views. You never manually add or remove views from a hierarchy or update individual properties. The framework diffs the previous and current state and applies the minimal changes needed.

This paradigm shift has profound implications for code quality and developer productivity. Declarative code tends to be more concise, easier to read, and less error-prone. A screen that might require 200 lines of UIKit code with delegate callbacks and manual constraint management can often be expressed in 50 lines of SwiftUI with automatic layout.

However, the imperative approach gives you finer control. When you need to optimize a specific animation, manage complex scroll behavior, or implement a custom gesture recognizer with precise timing, UIKit's explicit control model can be an advantage.

SwiftUI Strengths in 2023

Development speed. For standard UI patterns like lists, forms, navigation stacks, and data-driven views, SwiftUI is significantly faster to develop with. The live preview in Xcode provides instant visual feedback as you write code, eliminating the compile-run-test cycle for UI adjustments.

Cross-platform reach. A single SwiftUI view can run on iOS, iPadOS, macOS, watchOS, and tvOS with minimal platform-specific adjustments. For businesses that need presence across Apple's ecosystem, this reduces development effort substantially.

Modern Swift integration. SwiftUI embraces modern Swift features like property wrappers, result builders, and async/await. The code feels natural and idiomatic to Swift developers, and Apple's new APIs are increasingly designed with SwiftUI in mind.

Built-in animations. SwiftUI makes animations almost effortless. Adding a simple withAnimation wrapper makes state transitions animate smoothly with physics-based defaults. Custom animations that would require significant UIKit code happen with a few lines in SwiftUI.

Accessibility by default. SwiftUI components come with sensible accessibility labels and traits by default. Dynamic Type, VoiceOver support, and reduced motion preferences are handled automatically. While UIKit supports all of these, they require more explicit implementation.

UIKit Strengths in 2023

Maturity and stability. UIKit has been the foundation of iOS development for over fifteen years. Every edge case has been encountered and documented. The community knowledge base, including Stack Overflow answers, tutorials, and open-source libraries, is vastly larger than SwiftUI's.

Performance for complex UIs. For applications with extremely complex layouts, large collections of data, or demanding animation requirements, UIKit provides more predictable performance. You have direct control over view recycling, layer rendering, and drawing optimizations.

Collection views and complex lists. UICollectionView with compositional layouts remains more powerful and flexible than SwiftUI's LazyVGrid and LazyHGrid. For applications that need complex grid layouts, sectioned lists with different cell types, or advanced scrolling behaviors, UIKit's collection view system is superior.

Third-party library ecosystem. The majority of established iOS libraries are built for UIKit. While many now offer SwiftUI wrappers, the underlying implementations are UIKit-based, and direct UIKit integration often provides more configuration options.

Hiring and team expertise. The pool of experienced UIKit developers is significantly larger than experienced SwiftUI developers. If you are building a team or outsourcing development, finding senior UIKit talent is generally easier.

Performance Comparison

Performance is one of the most discussed topics in the SwiftUI vs UIKit debate, and the reality is nuanced. For typical application screens with moderate complexity, the performance difference is negligible. Users will not perceive any difference between a SwiftUI form and a UIKit form.

Where UIKit gains an advantage is in high-performance scenarios. Applications that display hundreds of cells in complex collection views, apps with real-time data updates at high frequency, and apps with elaborate custom animations can benefit from UIKit's lower-level control. UIKit lets you optimize at the Metal/Core Animation layer when needed, while SwiftUI's abstraction layer adds overhead.

Conversely, SwiftUI can actually outperform naive UIKit implementations because the framework's diffing algorithm applies only the minimum necessary updates. Developers who would otherwise write suboptimal UIKit update logic get efficient updates for free with SwiftUI.

The Hybrid Approach

In practice, most new iOS projects in 2023 do not choose exclusively between SwiftUI and UIKit. They use both. SwiftUI and UIKit are interoperable by design. UIHostingController wraps SwiftUI views for use in UIKit contexts, while UIViewRepresentable and UIViewControllerRepresentable wrap UIKit components for use in SwiftUI.

The pattern we recommend at StrikingWeb is to default to SwiftUI for new screens and features, and use UIKit when SwiftUI hits a limitation. Typical scenarios where UIKit components make sense within a SwiftUI app include complex map interactions, advanced text editing with attributed strings, custom camera interfaces, and integration with UIKit-based third-party SDKs.

This hybrid approach gives you SwiftUI's productivity benefits for the majority of your application while retaining UIKit's power for the specific screens that need it.

Our Decision Framework

When advising clients on which framework to use, we consider several factors:

Target iOS version: If you need to support iOS 14 or earlier, UIKit is the safer choice because many important SwiftUI features were introduced in iOS 15 and 16. If your minimum target is iOS 16 or later, SwiftUI is viable for nearly everything.

Application type: Content-driven apps, forms-heavy business apps, and utility apps are excellent SwiftUI candidates. Games, media-heavy apps, and apps with highly custom visual designs may benefit from UIKit's flexibility.

Team composition: A team of experienced UIKit developers will need time to learn SwiftUI patterns. Rushing a SwiftUI adoption with an unprepared team leads to poor architecture and frustration. Invest in training before committing to the framework.

Timeline: For a new project starting today with a modern iOS target, SwiftUI will likely result in faster development. For a project that needs to ship quickly and your team is strongest in UIKit, use what you know.

The trajectory is clear: SwiftUI is the future of Apple platform development. Apple is investing heavily in the framework, adding capabilities with each iOS release, and designing new platform features with SwiftUI as the primary interface. Starting new projects with SwiftUI today, supplemented by UIKit where needed, positions your application well for the years ahead.

Share: