これをxibで動作させることはできますが、ストーリーボードを使用して同じことを達成するにはどうすればよいですか? prepareForSegue を使用する必要があると思いますが、実装方法がわかりません。これが私のコードです:
- (void)buttonTouched:(id)sender {
// When picture is touched, open a viewcontroller with the image
PFObject *theObject = (PFObject *)[allImages objectAtIndex:[sender tag]];
PFFile *theImage = [theObject objectForKey:@"imageFile"];
NSData *imageData;
imageData = [theImage getData];
UIImage *selectedPhoto = [UIImage imageWithData:imageData];
PhotoDetailViewController *pdvc = [[PhotoDetailViewController alloc] init];
pdvc.selectedImage = selectedPhoto;
[self presentModalViewController:pdvc animated:YES];
}