mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-28 16:26:04 +00:00
15 lines
560 B
Markdown
15 lines
560 B
Markdown
# When to use SwiftUI, UIKit, and AppKit
|
||
|
||
## iOS
|
||
|
||
Use SwiftUI when possible. There are two cases where you should use UIKit instead:
|
||
|
||
1. When scrolling performance matters — the timeline, in other words, should not use SwiftUI
|
||
2. When SwiftUI can’t provide the user experience we want
|
||
|
||
## macOS
|
||
|
||
Use AppKit and .xib files. Avoid SwiftUI. Avoid storyboard files too — use .xib files.
|
||
|
||
Use Auto Layout in .xib files. Avoid writing Auto Layout constraints in code (sometimes it’s inevitable: if so, use `needsUpdateConstraints` and `updateConstraints`).
|