Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested scrolling does not interopate with Swift UI scrolling on iOS #3806

Open
chrisbanes opened this issue Oct 11, 2023 · 7 comments
Open
Assignees
Labels

Comments

@chrisbanes
Copy link

chrisbanes commented Oct 11, 2023

Describe the bug

When you host a ComposeUiViewController within a scrolling container in either UiKit or Swift UI, the scrolling is messed up, as both views are trying to consume the touch events.

On Android, nested scrolling can be translated and propagated via rememberNestedScrollInteropConnection(), enabling Compose to work nicely with Android's nested scrolling. Can we do similar for iOS?

The simplest repro is to display some scrolling content within a sheet in Swift UI:

struct ScrollingView: View {
    @State private var isShowingSheet = false
    
    var body: some View {
        HStack {
            Button(action: {
                isShowingSheet.toggle()
            }) {
                Text("Show License Agreement")
            }
        }
        .sheet(isPresented: isShowingSheet) {
            // ComposeUiViewController wrapped into UIViewControllerRepresentable
        }
    }
}

Versions

  • Compose Multiplatform version*: 1.5.10
  • OS version(s)*: iOS 17
@chrisbanes chrisbanes added bug Something isn't working submitted labels Oct 11, 2023
@elijah-semyonov elijah-semyonov added enhancement New feature or request ios uikit interop and removed bug Something isn't working submitted labels Oct 11, 2023
@elijah-semyonov
Copy link
Contributor

Hi, thanks for the report. We currently don't work on this specific scenario, but closely monitoring what people do with Compose to decide what to focus on.

@tylerwilson
Copy link

Same issue here: I have a Composable I am displaying in BottomSheet on Android, with a portion that is Column with vertical scroll enabled. The nestedScroll mostly solved the issue there.

Embedded same in iOS sheet results in not being able to scroll internal Column at all.

Kindly request looking into handing this scenario. Thank you.

@syy555
Copy link

syy555 commented Dec 13, 2023

Same issue here, waiting for result

@tipsypotato
Copy link

tipsypotato commented Jan 29, 2024

+1, any workaround?

@curliq
Copy link

curliq commented Apr 8, 2024

+1

@spartanmarty
Copy link

+1

1 similar comment
@jasin755
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants