Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>#pragma mark - UICollectionViewDataSource - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView { // Return the number of sections. // return [_carImages count] / 2; return 1; } - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { // Return the number of rows in the section. return [_carImages count]; } - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { // CellTasteCollectionView *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"Cell" forIndexPath:indexPath]; // image = [[UIImage imageNamed:[_carImages objectAtIndex:indexPath.row]]; // cell.imageView.image = image; // return cell; NSLog(@"INDEX PATH roe %@",[_carImages objectAtIndex:indexPath.row]); UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"Cell" forIndexPath:indexPath]; /* UIImageView *brickAnim = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile: imageFilePath]]; brickAnim.frame = CGRectMake(0, 0, 62, 57); [cell.contentView addSubview:brickAnim]; cell.layer.borderColor=[UIColor whiteColor].CGColor; cell.layer.borderWidth=2.0; */ cell.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:[_carImages objectAtIndex:indexPath.row]]]; return cell; /* MyCollectionViewCell *myCell = [collectionView dequeueReusableCellWithReuseIdentifier:@"MyCell" forIndexPath:indexPath]; UIImage *image; int row = [indexPath row]; image = [UIImage imageNamed:_carImages[row]]; myCell.imageView.image = image; return myCell;*/ } - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { // UIImage *image =[UIImage imageNamed: [_carImages objectAtIndex:indexPath.row]]; return CGSizeMake(40, 40); } - (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section { return UIEdgeInsetsMake(20, 20, 20, 20); } #pragma mark - #pragma mark UICollectionViewFlowLayoutDelegate /*-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { UIImage *image; int row = [indexPath row]; image = [UIImage imageNamed:_carImages[row]]; return image.size; }*/ - (void)selectItemAtIndexPath:(NSIndexPath *)indexPath animated:(BOOL)animated scrollPosition:(UICollectionViewScrollPosition)scrollPosition{ } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload