gpt4 book ai didi

ios - 表格 View 日期仅选择长按

转载 作者:可可西里 更新时间:2023-11-01 02:02:41 25 4
gpt4 key购买 nike

我在 Xib 中使用 tableViewCell

在表格 View 中,didSelectRowAt 函数仅在我长按 tableViewCell 时调用

我的代码在下面

func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
categorytabelview.deselectRow(at: indexPath, animated: true)
self.categorylabel.text = totalArrayofCars.object(at: indexPath.row) as? String
categorytabelview.isHidden = true
}

我想通过单选而不是长按来选择 tabelViewCell 数据。

My tabel view is displaye above the select carcategory button

最佳答案

由于您使用的是手势,因此在添加要查看的手势之前,添加以下行

tap.cancelsTouchesInView = false // assuming tap is your gesture recogniser variable

关于ios - 表格 View 日期仅选择长按,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45191164/

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