What are you trying to pass image name(i.e. NSString object) or image itself(i.e. UIImage object).
If you are passing image name then use following
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.identifier isEqualToString:@"showRecipeDetail"]) {
BehindContributors *destViewController = segue.destinationViewController;
[destViewController setImageName:@"1.jpg"];
}
}
Destination view should have property imageName of NSString type
then use it as
self.imageView.image = [UIImage imageName:imageName];
If you are passing image then use following
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.identifier isEqualToString:@"showRecipeDetail"]) {
BehindContributors *destViewController = segue.destinationViewController;
[destViewController setImageData:[UIImage imageNamed:@"1.jpg"]];
}
}
Destination view should have property imageData of UIImage type
then use it as
self.imageView.image = imageData;