I have a UIViewController
containing a UIImageView
that has been correctly wired up (I can set image inside controller).
I have also set an iVar using
UIImageView *_imgQRCode;
and a property using
@property (strong, nonatomic) IBOutlet UIImageView *imgQRCode;
Synthesized using:
@synthesize imgQRCode = _imgQRCode;
But when I call something like below I nothing happens the image and when I inspect in Xcode the reference is memory reference is 0x00000000
. note the code works when called inside the ViewController. The following is called from any other view controller with controller instantiated as follow:
QRPopupViewController *qrPop = [[QRPopupViewController alloc] initWithNibName:@"QRPopupViewController" bundle:nil];
[controller.imgView setImage:[UIImage imageNamed:@"sample.png"]];
Any ideas how to fix this and why i'm getting null?