UIKit or SwiftUI: Which Should You Use in Production?

UIKit or SwiftUI: Which Should You Use in Production?

You're supporting iOS 13+ but want to control the risks related to SwiftUI and be able to fall back to UIKit seamlessly. Sticky UI Frameworks.

Is SwiftUI ready to go live?

Apple has recently released iOS 14, which means SwiftUI already has a required one-year buffer for being adopted not only by enthusiasts in their pet projects but actually by enterprise teams in their business apps.

Literally everyone says writing SwiftUI code is fun, but is SwiftUI a toy or a professional tool? If we want to take it seriously, we need to consider its stability and flexibility as a tool, not as a toy.

When is the right time to start using SwiftUI in the production code?

This question is rather tricky to answer if you’re starting a new major project between 2020 and possibly 2022!

With all the innovation that SwiftUI brought in, even by iOS 14, we still have bugs and a lack of flexibility for customization.

While this can be mitigated by situationally appealing to UIKit, can you estimate how much code will eventually be written in UIKit? Could SwiftUI become a burden in the long run, where you’d better off just writing everything in UIKit?

We can only bet on iOS 15 to have no issues with SwiftUI. It means that only by 2022 at best (with the release of iOS 16) will we have a perfect moment to relax and fully trust SwiftUI.

In this article, I elaborate on how to structure the project in two scenarios:

  1. You’re supporting iOS 11 or 12 but consider migrating the app to SwiftUI in a foreseeable future.
  2. You’re supporting iOS 13+ but want to control the risks related to SwiftUI and be able to fall back to UIKit seamlessly.

swiftui programming mobile swift ios

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

SwiftUI Grids in iOS 14

SwiftUI was announced at WWDC 2019 and it paved a way for declarative programming for building interfaces. SwiftUI Grid comes in two different flavours, which includes LazyVGrid and LazyHGrid. As the name suggest, LazyVGrid is a Grid that flows in vertical direction and the LazyHGrid flows in horizontal direction

How to Build a Timer using Swift and SwiftUI

A great place to start building with SwiftUI

Understanding Grids in SwiftUI for iOS 14

SwiftUI was announced at WWDC 2019 and it paved a way for declarative programming for building interfaces. SwiftUI Grid comes in two different flavours, which includes LazyVGrid and LazyHGrid. As the name suggest, LazyVGrid is a Grid that flows in vertical direction and the LazyHGrid flows in horizontal direction.

SwiftUI’s GroupBox, OutlineGroup, and DisclosureGroup in iOS 14

SwiftUI was inevitably going to see big changes this year, and I'm really excited to experiment with them all – text views, color pickers, progress

Want More From ColorPicker in iOS 14? Create 1500+ SwiftUI Pickers of Your Own

Make custom colour pickers and reuse them in any project with Swift Package Manager