How to expand a row cell smoothly with a custom view in SwiftUI List?

后端 未结 1 993
[愿得一人]
[愿得一人] 2020-12-21 09:27

I am trying to expand a row cell (which is a custom view) on tap gesture. The cell height has to be increased and a button is being moved in the expanded area. But I get the

相关标签:
1条回答
  • 2020-12-21 10:26

    Just use animatable modifier from this my solution

    Tested with Xcode 11.4 / iOS 13.4

    ZStack {
     // .. other your code here
    }
    .modifier(AnimatingCellHeight(height: self.isExpanded ? 120 : 200))
    
    0 讨论(0)
提交回复
热议问题