Freek
1 min readSep 29, 2021

--

This article seems to gloss over a lot of important facts regarding both SwiftUI and UIKit. I don't know whether deliberately or ignorantly....

Ultimately, at the highest level, both SwiftUI and UIKit are the same thing: abstractions over CoreGraphics and CoreAnimations for building and rendering the UI elements. But with some key differences:

- UIKit exposes its underlying connections to CG and CA, giving you nearly complete control over everything.

- SwiftUI uses a lot of UIKit components behind the scenes and is still very, very reliant on UIKit. Like, exceptionally so.

Luckily, both can live in harmony together. Using ViewRepresentable you can put any UIKit view in your SwiftUI. And using UIHostingController you can render your SwiftUI views in your UIKit environment.

More people (especially younger/new developers) will definitely move to SwiftUI instead of UIKit. Because it's easy to understand, falls inline with modern companions like React, Flutter and Jetpack Compose, and you can hack something together impressively fast.

But saying UIKit is dying is just... ignorant and obtuse.

--

--

Freek

Graphic design, computer graphics, iOS and web development. Fan of Go, Rust, Swift and Typescript. My words bear no authority whatsoever.