[英]SwiftUI | Drag and Drop using LazyVGrid?
Is it possible to reorder the items inside the LazyVGrid using drag and drop?是否可以使用拖放重新排序 LazyVGrid 中的项目?
Like something similar to the Editmode when using a List together with.onMove()?与.onMove() 一起使用 List 时类似于 Editmode 吗?
Thanks!谢谢!
According to an Apple Engineer :根据苹果工程师的说法:
That's not built-today, though you can use the
View.onDrag(_:)
andView.onDrop(...)
to add support for drag and drop manually.这不是今天内置的,尽管您可以使用
View.onDrag(_:)
和View.onDrop(...)
手动添加对拖放的支持。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 |
SwiftUI | Using onDrag and onDrop to reorder Items within one single LazyGrid?
使用 onDrag 和 onDrop 在一个 LazyGrid 中重新排序项目?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.