any tips for getting ime padding / keyboard avoida...
# compose-ios
c
any tips for getting ime padding / keyboard avoidance right on iOS? I find the same implementation behaves differently on iOS vs Android. Can't find any good guidance either - seems like we just have to try & guess a few options
a
Hi! The question is what do you want to achieve. We're trying to be as close to Android as we can, but sometimes it's tricky. So what is your problem?
c
My problem ended up being
.consumeWindowInsets()
wasn't working on iOS - seems like this is a bug in CMP 1.10.x though https://youtrack.jetbrains.com/projects/CMP/issues/CMP-9390/iOS-seems-to-ignore-consumeWindowInsets
a
The issue seems to be fixed in the
1.11.0-alpha02
, so you can try the latest Compose version - like
1.11.0-beta03
. As I previously mentioned - it should work pretty close to Android, otherwise - please file a new issue with a valid reproducer in our YouTrack.
c
Just tried out 1.11.0-beta03 and looks like horizontal padding has been added to all scaffold content. Is that a new insets change on iOS as well? (The ime issue is fixed though)
Perhaps JB could publish some inset configuration examples? It's just very confusing to us if there's a bug or if we're implementing something wrong on iOS with each release
Just seems like if we're using
.ignoresSafeArea(.all)
on iOS then insets behaviour should be the same between our Android and iOS apps no?
a
Just seems like if we're using
.ignoresSafeArea(.all)
on iOS then insets behaviour should be the same between our Android and iOS apps no?
Yes, it should work like this. If no - most likely it is an issue. To be easier to understand your problem - it's better to provide some code example and describe your expectations - then we can figure out what is wrong with it. Btw, does your problem looks similar to this one: https://youtrack.jetbrains.com/issue/CMP-10046/WindowInsets.systemBars-add-some-arbitrary-horizontal-space-on-iOS-but-not-on-Android ?