Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/103.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 相册在uicollectionview中以错误的顺序出现_Iphone_Ios_Objective C_Cell_Uicollectionview - Fatal编程技术网

Iphone 相册在uicollectionview中以错误的顺序出现

Iphone 相册在uicollectionview中以错误的顺序出现,iphone,ios,objective-c,cell,uicollectionview,Iphone,Ios,Objective C,Cell,Uicollectionview,我正在使用一个名为psuicollection view cell的库在单元格中发布一些图片。除了一个关键的缺陷外,它工作得很好。它没有按正确的顺序发布,相反的顺序。如果我发布图片A,然后是图片B,图片B将是第一张图片,然后图片A将是下一张图片。如何反转图像的顺序 - (PSUICollectionViewCell *)collectionView:(PSUICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath

我正在使用一个名为psuicollection view cell的库在单元格中发布一些图片。除了一个关键的缺陷外,它工作得很好。它没有按正确的顺序发布,相反的顺序。如果我发布图片A,然后是图片B,图片B将是第一张图片,然后图片A将是下一张图片。如何反转图像的顺序

 - (PSUICollectionViewCell *)collectionView:(PSUICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
PhotosModel *photoModel = [self.Photos objectAtIndex:indexPath.row];
Cell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:GridCellIdentifier forIndexPath:indexPath];
  cell.image.clipsToBounds=YES;
[cell.image setContentMode:UIViewContentModeScaleAspectFill];
 [cell.image setImageWithURL:[NSURL URLWithString:photoModel.image_name]];
return cell;
  }

反转阵列的顺序如何:

NSArray* reversedArray = [[self.Photos reverseObjectEnumerator] allObjects];

你在哪里使用photoModel?谢谢,我不知道。