點擊CollectionViewCell沒反應和Tap手勢衝突?Paul.Lien·FollowNov 23, 2021--ListenShare今天在debug時,發現點選CollectionViewCell都沒反應。發現TableView/CollectionView很常遇見這問題。以下文章有說明原因UITableView和Tap手勢衝突的問題(UITableView, tap,UIGestureRecognizerDelegate)medium.comiOS App 表格點選收鍵盤的方法開發 iOS App 時,輸入內容的表單頁面很適合用 table view 實現。而當內容輸入後,我們通常希望點選表格就能收鍵盤,這樣的功能可以透過 UITableViewDelegate 或…medium.com解決方式:Tap手勢設定cancelsTouchesInView=false,取消touchInView個別在view設定Tap手勢