0
我无法访问集合视图单元格中的属性。当执行GetCell方法时,我检查断点,并将项目添加到单元格变量中,所有正确的数据都是完美的。但是,当我然后执行ItemHighlighted事件cell.item
为空。UICollectionViewCell属性返回null
我试过RegisterClassForCell
,但是这会导致应用程序运行时没有任何单元格可见。
ExistingEvaluationsCollection.RegisterClassForCell(typeof(ExistingEvaluationCell), ExistingEvaluationCell.CellId);
ExistingEvaluationsCollection.Source = source;
我通过将'DequeueReusableCell'改为'CellForItem(indexPath);' – Bish25