You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When scrolling a LazyColumn inside a UIViewController, the scrolling is ignored by the SwiftUI components, for example scrolling the content will not trigger the TabView's bottombar transitions into showing the shadow and the blur, and with a navigation title it won't collapse and expand the top navigation bar/
Affected platforms
iOS
Versions
Libraries:
Compose Multiplatform version: 1.6.4
Navigation Multiplatform version (for related issues): n/a
Kotlin version: 1.9.22
OS version(s) iOS 17.0
OS architecture (x86 or arm64): xcode simulator
Device (model or simulator for iOS issues): iphone 15 pro max
fun ScreenViewController() =
ComposeUIViewController {
Screen()
}
@available(iOS 16.0, *)
@main
struct iOSApp: App {
init() {
IosModulesKt.startKoin()
}
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
struct ContentView: View {
var body: some View {
TabView {
Screen()
.tabItem {
Label("Hello", systemImage: "gear")
}
// ... more tabs
}
.onAppear() {
let standardAppearance = UITabBarAppearance()
// this would be triggered if the content reaches the bottombar
standardAppearance.configureWithTransparentBackground()
standardAppearance.backgroundColor = UIColor.systemGray6
UITabBar.appearance().standardAppearance = standardAppearance
}
}
}
struct Screen: UIViewControllerRepresentable {
func makeUIViewController(context: Context) -> UIViewController {
return MainViewControllerKt.ScreenViewController()
}
func updateUIViewController(_ uiViewController: UIViewController, context: Context) {}
}
Scroll down
See error
Expected behavior
The content would be drawn behind the bottombar and the bottombar would become slightly transparent. This is just the standard tabview behaviour if you use a SwiftUI ScrollView or a List, instead of the compose UIViewController
Additional context
I know the scrolling is handled by compose and is not an iOS native scroll but to be able to use compose in swiftUI it would be quite important to share scroll events
The text was updated successfully, but these errors were encountered:
elijah-semyonov
changed the title
Compose scrolling is ignored by SwiftUI scroll events
Compose layout system doesn't handle additionalSafeAreaInsets correctly.
Jun 7, 2024
Describe the bug
When scrolling a LazyColumn inside a UIViewController, the scrolling is ignored by the SwiftUI components, for example scrolling the content will not trigger the TabView's bottombar transitions into showing the shadow and the blur, and with a navigation title it won't collapse and expand the top navigation bar/
Affected platforms
Versions
To Reproduce
Steps to reproduce the behaviour:
Expected behavior
The content would be drawn behind the bottombar and the bottombar would become slightly transparent. This is just the standard tabview behaviour if you use a SwiftUI ScrollView or a List, instead of the compose UIViewController
Screenshots
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-06-07.at.13.38.48.mp4
Example of an apple app with the tabview bottombar default behaviour:
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-06-07.at.13.39.11.mp4
Additional context
I know the scrolling is handled by compose and is not an iOS native scroll but to be able to use compose in swiftUI it would be quite important to share scroll events
The text was updated successfully, but these errors were encountered: