Daily iOS
SwiftUI

WidgetKit and SwiftUI

You've been assigned home screen widget development. Why can widgets only be built with SwiftUI and not UIKit?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

A widget is a static view the system renders from timeline snapshots, not something running in your app's process, so only SwiftUI, which can hand over a view as a description, works.

Share a question