【发布时间】:2017-01-21 08:36:10
【问题描述】:
说明:
我有一个UITableViewCells 列表,每个UICollectionView 的数量为UICollectionViewCells(请参阅下图以获得更清晰的信息)
这背后的想法是能够实现顶部带有标题和水平滚动的部分UICollectionView
一切都很好,除了当我试图集中UICollectionViewCells(又名:CategoryCell)。 UITableViewCell 获得焦点并突出显示所有内容,从而无法集中任何 UICollectionViewCells。
我尝试过的:
根据其他帖子,解决此问题的方法是停用用户交互和/或将UITableViewCell 上的选择样式设置为无:
cell.selectionStyle = UITableViewCellSelectionStyle.None
并改为在 UICollectionViewCell 上启用用户交互。
以下是讨论它的帖子:
UITableViewCell with UITextField losing the ability to select UITableView row?
How can I disable the UITableView selection highlighting?
我尝试实施这些解决方案但没有成功。
问题:
我错过了哪一步?修复程序不适用于 tvOS 吗?如何将 UICollectionViewCell 中的 UICollectionView 集中在 UITableViewCell 中?
更多:
图片显示了我的 UITableViewController 以及我的 StoryBoard 中的所有内容。
【问题讨论】:
标签: swift uitableview uicollectionview uicollectionviewcell tvos