Ich versuche, ein UIImage von einem First View Controller an Second View Controller zu übergeben, aber dies erscheint nicht in der zweiten Ansicht. Warum?OBJEKT-C: PushViewController mit UIImage funktioniert nicht
Mein Code in FirstController.m:
SecondController *second = (SecondController *)[self.storyboard instantiateViewControllerWithIdentifier:@"SBSecondController"];
second.imgCard.image = [UIImage imageNamed:@"image.png"];
[self.navigationController pushViewController:second animated:YES];
Mein Code in SecondController.h:
@property (nonatomic, strong) IBOutlet UIImageView *imgCard;
Mein Code in SecondController.m:
@implementation SecondController
@synthesize imgCard;
Vielen Dank! Das ist die Lösung :) @Subhash Sharma – David
:) Happy Coding –