我的行为很奇怪 TableView
TableView
我转身 isUserInteractionEnabled 在我的一个分区标题上,因为我需要 collectionView 在里面。在我做任何事情之前,我注意到当我点击标题视图时(它是 UITableViewCell )它触发了 didSelectRowAt 方法,其中包含该节中第一个单元格的索引(在标题的正下方)。有人知道是什么导致了这种行为以及如何关掉它吗?
isUserInteractionEnabled
collectionView
UITableViewCell
didSelectRowAt
标题部分是UITableView的一部分。
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath){ }