在TableVIew headerView中显示CollectionVIew

时间:2015-07-22 08:41:06

标签: ios objective-c iphone

在单元格标题内添加Hidden

我需要在UICollectionview的{​​{1}}添加UICollectionView

到目前为止我在tableview控制器中的代码:

headerview

2)。

UITableViewController

3。)

-(UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {

    static NSString *CellIdentifier = @"SectionHeader";

    MyTableViewCell *headerView = (MyTableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];

    return headerView;

}

4。)

-(void)tableView:(UITableView *)tableView willDisplayCell:(MyTableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {




}

它只在表格的-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { return 3; } 上显示-(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"cell2" forIndexPath:indexPath]; return cell; } 的黑框。不显示集合视图单元格。我怎么能这样做?

故事板:

enter image description here

更新

UICollectionView

0 个答案:

没有答案
相关问题