【发布时间】:2015-04-08 19:33:46
【问题描述】:
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:reuseIdentifier forIndexPath:indexPath];
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"TNCNewsRow" bundle:nil];
TNCNewsRowViewController *rowVC = (TNCNewsRowViewController*)[storyboard instantiateViewControllerWithIdentifier:@"storyboard2"];
NSArray *news = [_news objectAtIndex:indexPath.section];
rowVC.news = news;
cell.contentView = rowVC; // ??
return cell;
}
我正在尝试将 CollectionViewB 添加到另一个 CollectionViewA 的单元格中。 但我不确定如何以编程方式执行此操作。
【问题讨论】:
标签: ios uicollectionview uistoryboard