iOS - UITableViewCell 中的 UICollectionView,处理触摸时出现问题
iOS - UICollectionView in UITableViewCell, problems when handling touch
我的 UITableView
中的每个 UITableViewCell
都有一个 UICollectionView
。
该程序应该执行一个 segue,点击 UITableViewCell
但单元格刚好在 UICollectionView
.
之外是可点击的
只有红色部分可以点击。
你有什么想法吗?
您需要在每个集合视图中禁用用户交互:
在你的情节提要中取消选中这里:
或者在你的 cellForRowAtIndexPath
:
cell.collectionView.userInteractionEnabled = NO;
我的 UITableView
中的每个 UITableViewCell
都有一个 UICollectionView
。
该程序应该执行一个 segue,点击 UITableViewCell
但单元格刚好在 UICollectionView
.
只有红色部分可以点击。
你有什么想法吗?
您需要在每个集合视图中禁用用户交互:
在你的情节提要中取消选中这里:
或者在你的 cellForRowAtIndexPath
:
cell.collectionView.userInteractionEnabled = NO;