SwiftUI and UIKit: choosing an approach

The choice depends on the app, its existing code and the interfaces it needs.

SwiftUI and UIKit are Apple frameworks for building app interfaces. They can also be used together; a project does not have to choose only one.

## SwiftUI SwiftUI uses a declarative approach: the code describes the interface and its relationship to data. Xcode previews can help inspect views while developing them.

## UIKit UIKit is relevant when working with an existing UIKit codebase or interfaces that need its controls and integration points.

## Decide in context For a new screen, consider the target operating-system versions, accessibility and required behaviour. For an existing app, evaluate changes screen by screen rather than assuming that a full rewrite is necessary.

By Jiří Čech ·

Enable JavaScript for the full interactive website.