gpt4 book ai didi

ios - 如何使用 .automatic DropProposal int iOS 11 区分用户意图

转载 作者:行者123 更新时间:2023-11-29 00:16:22 33 4
gpt4 key购买 nike

我有一个适合 UIDropProposal 中的 .automatic 意图的应用程序。像这样:

UITableViewDropProposal(operation: .copy, intent: .automatic)

我的问题是我似乎无法弄清楚用户的意图是什么?他打算将数据插入新单元格还是只是覆盖现有单元格。所有动画效果都很好。

但是在

func tableView(_ tableView: UITableView, performDropWith coordinator: UITableViewDropCoordinator) {

我需要能够知道用户最终的意图。

如何做到这一点?

我错过了什么?

谢谢。

最佳答案

coordinator.proposal.intent 应提供 UITableViewDropIntent 并在 insertAtDestinationIndexPathinsertIntoDestinationIndexPath 之间进行选择,如果 .automatictableView(:dropSessionDidUpdate) 中指定。 WWDC 视频说表格 View 将在两者之间进行选择。不过,还没有取得足够的进展来验证它。

关于ios - 如何使用 .automatic DropProposal int iOS 11 区分用户意图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45228323/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com