3

是否可以使用拖放重新排序 LazyVGrid 中的项目?

与 .onMove() 一起使用 List 时,类似于 Editmode 吗?

谢谢!

4

1 回答 1

1

According to an Apple Engineer:

That's not built-today, though you can use the View.onDrag(_:) and View.onDrop(...) to add support for drag and drop manually.

Do file a feedback request if you'd like to see built-in reordering support. Thanks!

So unfortunately we are on our own here. :/

Have you tried this? SwiftUI | Using onDrag and onDrop to reorder Items within one single LazyGrid?

于 2020-07-28T10:47:02.890 回答