How do I modify the background color of a List in SwiftUI?

后端 未结 14 1357
醉酒成梦
醉酒成梦 2020-12-03 02:33

I\'m trying to recreate an UI I built with UIKit in SwiftUI but I\'m running into some minor issues.

I want the change the color of the List here, but n

14条回答
  •  孤城傲影
    2020-12-03 02:46

    List is not perfect yet.

    An option would be to use it like this -> List { ForEach(elements) { }} instead of List($elements)

    On my end this is what worked best up to now. Like @FontFamily said, it shouldn't break any List default behaviors like swiping.

提交回复
热议问题