2 guodeganggdg guodegangGDG 于 2013.04.17 10:02 提问

collectionView出现的错误

在将UITable转换为collectionView时出了问题。

实现代码如下,但是在这里报错: collectionView dequeueReusableCellWithIdentifier

- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView
{
    return 1;
}
//  Return the number of rows in the section (the amount of items in our array)
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
    return [pictureListData count];
}
//  Create / reuse a table cell and configure it for display
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView
                  cellForItemAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *CellIdentifier = @"Cell";
    UICollectionViewController *cell = [collectionView dequeueReusableCellWithIdentifier:CellIdentifier];
    // Get the core data object we need to use to populate this table cell
    Pictures *currentCell = [pictureListData objectAtIndex:indexPath.row];
Csdn user default icon
上传中...
上传图片
插入图片