Hello, can I add to a modal I am presenting swipe ...
# compose-ios
r
Hello, can I add to a modal I am presenting swipe to dismiss?
Copy code
override fun presentAddEvent(appTheme: AppTheme, onSave: () -> Unit) {
        val rootVC = UIApplication.sharedApplication.keyWindow?.rootViewController
        val s = ComposeUIViewController(
            content = {
                AppTheme(appThemeMode = appTheme.appThemeMode, appColor = appTheme.appColor) {
                    AddEventScreen(onCancel = {
                        rootVC?.dismissViewControllerAnimated(
                            true,
                            completion = null
                        )
                    }, onSave = {
                        rootVC?.dismissViewControllerAnimated(
                            true,
                            completion = null
                        )
                        onSave.invoke()
                    })
                }
            }
        )
        rootVC?.presentViewController(s, animated = true, completion = null)
    }