Is it possible to use familly activity picker with storyboard

I'm going to add Screen Time API functionality to the existing app. I'm wondering if I can use this functionality without SwiftUI

Answered by robnotyou in 689728022

On the face of it, FamilyControls are not part of SwiftUI, so I don't see why they couldn't be used without it.
Having said that, FamilyActivityPicker conforms to View, which is a SwiftUI component.

In UIKit code, you could create the FamilyActivityPicker, but because it's a (SwiftUI) View, you can't directly add it to a ViewController.

You would have to use a UIHostingController, which is the generic solution for adding SwiftUI to a UIKit app.

Accepted Answer

On the face of it, FamilyControls are not part of SwiftUI, so I don't see why they couldn't be used without it.
Having said that, FamilyActivityPicker conforms to View, which is a SwiftUI component.

In UIKit code, you could create the FamilyActivityPicker, but because it's a (SwiftUI) View, you can't directly add it to a ViewController.

You would have to use a UIHostingController, which is the generic solution for adding SwiftUI to a UIKit app.

Is it possible to use familly activity picker with storyboard
 
 
Q