Vaizin Nikita
02/10/2025, 2:14 AMpublic fun ORLABannerVC(): UIViewController = ComposeUIViewController {
AppTheme { ORLABanner() }
}
@Composable
internal fun ORLABanner(
modifier: Modifier = Modifier,
) {
Text("Banner")
}
// swift
struct ComposeView: UIViewControllerRepresentable {
let factory: () -> UIViewController
func makeUIViewController(context: Context) -> UIViewController {
return factory()
}
func updateUIViewController(_ uiViewController: UIViewController, context: Context) { }
}
struct OngoingRitualLiveActivity: Widget {
var body: some WidgetConfiguration {
// Lock screen/banner UI
ActivityConfiguration(for: OngoingRitualAttributes.self) { context in
ComposeView { ORLAUI.shared.ORLABannerVC() }
} dynamicIsland: { context in
DynamicIsland {
DynamicIslandExpandedRegion(.leading) {
ComposeView { ORLAUI.shared.ORLAExpandedLeadingRegionVC() }
Text("DIEL-SUI")
}
}
}