Swiftui List Row Cells set padding after View appears

后端 未结 4 1543
醉梦人生
醉梦人生 2021-02-15 12:28

I have a standard List only with one Text and on the right side the arrow for navigation. But after the list is loading and appeared at Screen, the list addapt the cells I think

4条回答
  •  深忆病人
    2021-02-15 12:57

    Edit: iOS 13.6 fixed the issue, my solution following from back then now produces a glitch instead of fixing it!

    There is a potential fix for this which produces other complications:

    Animations. This weird bug is affected by animations, so just give it an animation like

    List {
                       ForEach(0..

    Will make the bug at least invisible, but be warned that all subviews will inherit that animation, so you manually need to override it again for them. If you are writing a professional app, rather use the TableView fix from Repose's answer.

    Strange thing: We found out it happens on iPhone XR and 11 (Simulator and real device) but not on iPhone 11 Pro, so it might only occur on LCD devices???

    I hope this helps future visitors of this thread who stumble on this thread like I did while experiencing that bug

提交回复
热议问题