Код: Выделить всё
@State var items = ["item0", "item1", "item2"]
List {
ForEach(items, id: \.self) { item in
ZStack {
Rectangle()
.frame(width: 150, height: 65)
Text(item)
}
.onMove { from, to in
items.move(fromOffsets: from, toOffset: to)
}
}
.listRowSeparator(.hidden)
.listRowBackground(Color.clear)
}
.listStyle(.plain)
.scrollContentBackground(.hidden)
Подробнее здесь: https://stackoverflow.com/questions/752 ... g-pressing