//图集delegate - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{ return 1; } - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{ // NSMutableArray *sectionArray = [self.dataArray objectAtIndex:section]; if(m_tujiList==nil) return 0; return [m_tujiList count]; }
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{ static NSString *SimpleTableIdentifier=@"TujiCollCell"; TujiCollCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:SimpleTableIdentifier forIndexPath:indexPath]; return cell; }
UINib *cellNib = [UINib nibWithNibName:@"TujiCollCell" bundle:nil]; [m_collectionView registerNib:cellNib forCellWithReuseIdentifier:@"TujiCollCell"];