以下のログ出力に示すように、imageFile は正しく返されますが、image は返されません。
セグエのコードは次のとおりです。
- (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];
NSLog(@"object is %@", tempObject);
NSString *commentGet = [tempObject objectForKey:@"comment"];
destViewController.comment = commentGet;
PFFile *imageFile = [tempObject objectForKey:@"image"];
NSLog(@"ImageFile is %@", imageFile);
NSData *data = [imageFile getData];
UIImage *image = [[UIImage alloc] initWithData:data];
destViewController.bandImageName = image;
NSLog(@"image is %@", image);
ログ出力は次のとおりです。
object is Photos:RvKHQNYMtj:(null)
album = Promos;
comment = "Promo Pic 2011";
image = "PFFile: 0x16d901a0";
ipadImage = "PFFile: 0x16d88f40";
thumbnail = "PFFile: 0x16d9d360";
ImageFile is PFFile: 0x16d901a0
Warning: A long-running Parse operation is being executed on the main thread.
Break on warnParseOperationOnMainThread() to debug.
image is UIImage: 0x16ecfac0
comment is Promo Pic 2011
image is (null)
迅速な返答に感謝致します。3時間検索してから投稿した後、10分後に間違いを見つけました. 私は財産を適切に保持していませんでした。