【发布时间】:2013-07-12 11:34:57
【问题描述】:
我正在使用集合视图控制器来显示缩略图。单击缩略图,segue 会以模态方式打开完整图像。它在模拟器上运行良好,但在我的 iphone 或 ipad 上却不行。完整的图像是空白的。 “评论”显示在所有设备中。
这是转场:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.identifier isEqualToString:@"showBandPhoto"]) {
NSArray *indexPaths = [self.collectionView indexPathsForSelectedItems];
BDBPhotoViewController *destViewController = segue.destinationViewController;
NSIndexPath *indexPath = [indexPaths objectAtIndex:0];
PFObject *tempObject = [imageObjectsArray objectAtIndex:indexPath.row];
PFFile *imageFile = [tempObject objectForKey:@"image"];
NSData *imageData = [imageFile getData];
UIImage *image = [UIImage imageWithData:imageData];
destViewController.bandImageName = image;
NSLog(@"image is %@", image);
NSString *commentGet = [tempObject objectForKey:@"comment"];
destViewController.comment = commentGet;
这是照片控制器 viewDidLoad 的代码:
self.photoImageView.image = bandImageName;
self.commentLabel.text = comment;
【问题讨论】:
-
在检索数据之前segue是否完成?仍然不知道为什么模拟器会工作。
标签: ios imageview reload parse-platform