Max
11/14/2024, 10:10 PMFrançois
11/14/2024, 10:15 PMAndrei Salavei
11/15/2024, 7:35 AMUIGestureRecognizerDelegate
and deprioritize the CMPGestureRecognizer
.
• Compose BackHandler is a highly-demanded feature. We're working on it.François
11/15/2024, 9:00 AMandrew
11/20/2024, 2:29 AMHristijan
11/20/2024, 11:43 PMHristijan
11/21/2024, 8:34 AMfun MainViewController(
onAppInitialized: (() -> Unit)? = null
) = ComposeUIViewController(
configure = {
onFocusBehavior = OnFocusBehavior.DoNothing
}
) {
CMPApp(
onAppInitialized = onAppInitialized
)
}
Sorry for the dumb question but my use case is different i guess, or we’re talking about 2 different things.
How do I do this in this simple code, what i want to do is to enable the “swipe back gesture” navigation, i can manually call navigate to GlobalNavController.navigateUp
i just want to have the swipe back functionality baked in with some callback and i’ve no idea how to achieve it in this current setupAndrei Salavei
11/21/2024, 8:38 AMHristijan
11/21/2024, 8:50 AMAndrei Salavei
11/21/2024, 9:01 AMCMPGestureRecognizer
. To adjust the behaviour, you can use the UIGestureRecognizerDelegate
to configure priority or feedback of your gesture recognizer.Hristijan
11/21/2024, 9:59 AMstruct ComposeView: UIViewControllerRepresentable {
var onAppInitialized: (() -> Void)?
func makeUIViewController(context: Context) -> UIViewController {
MainViewControllerKt.MainViewController(
onAppInitialized: onAppInitialized
)
}
func updateUIViewController(_ uiViewController: UIViewController, context: Context) {}
}
struct ContentView: View {
var body: some View {
ZStack {
Color(.surface)
ComposeView(onAppInitialized: {
}
})
}
}
Hristijan
11/21/2024, 10:00 AM@main
struct iOSApp: App {
init() {
MainViewControllerKt.initialiseDependencies()
}
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
Andrei Salavei
11/21/2024, 1:09 PM