如何淡出 table 选区
How to fade out table selection
当在我的应用中选择了一个 tableview 单元格时,它会保持选中状态,直到选择了另一个单元格。
如何使 tableview 单元格的突出显示在一两秒后淡出,类似于 Apple 的 Find My Friends 应用程序和 Find My iPhone 应用程序。将距离从以英里为单位切换为以公里为单位时,您可以看到该单元格突出显示,然后突出显示逐渐消失。
确定是您先搜索了答案吗?
总之...
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
}
当在我的应用中选择了一个 tableview 单元格时,它会保持选中状态,直到选择了另一个单元格。
如何使 tableview 单元格的突出显示在一两秒后淡出,类似于 Apple 的 Find My Friends 应用程序和 Find My iPhone 应用程序。将距离从以英里为单位切换为以公里为单位时,您可以看到该单元格突出显示,然后突出显示逐渐消失。
确定是您先搜索了答案吗?
总之...
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
}