我有一段代码来设置文本单元格标签,并将其设置为Stock结构的name属性: let cell = tableView.dequeueReusableCellWithIdentifier("stockItem", forIndexPath: indexPath)
if let label:UILabel = cell.textLab
我尝试将indexPath设置为selectedIndexPath,并在集合视图中设置段,然后在tableView中使用它,但它抛出了一个错误。下面是代码。ProfileCollectionViewCell
let indexPath = collectionView?.indexPathForCell(cell)