Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8927659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:16:06+00:00 2026-06-15T08:16:06+00:00

I have a UIViewController containing a UIImageView that has been correctly wired up (I

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T08:16:07+00:00Added an answer on June 15, 2026 at 8:16 am

    You will get null for all UI Control’s instances which are not part of the currently visible view controller. So due to this all your calls to that UI control will not perform the UI related operation.

    If you want to update any UI control which is not part of currently visible view controller, you can use app delegate. It is the only place which is centralized in between all view controllers.

    There is a mechnism, called “protocol delegate” to call some method to update UI part from the currently visible view controller. You can go through this URL for detail about this.

    If you are selecting the approach of “protocol delegate”, then explore the method execution flow in detail. When you call a protocol from a method of currently visible view controller, the corresponding protocol implementation method will be called after the completion of the caller method. So you need to take care of synchronization.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom UIViewController subclass controlling a UISCrollView containing an UIImageView, set up
I have a uiviewcontroller with two properties: trackName and playerObject. PlayerObject also has a
I have a UINavigationController with a UIViewcontroller containing a tableview that is being presented
I have a view controller (derived from UIViewController not UITableViewController) containing a table view.
I have a UIViewController that contains UITextField . I set the inputAccessory of the
I have a UINavigationController containing an UIViewController initialized with a UIView. The UINavigationController also
I have a .h file containing... myViewController : UIViewController {} in the .m file
I have a problem with data in UITableView. I have UIViewController, that contains UITableView
I have a UIViewController (which sits inside a tabUIController). Within this UIViewController, I want
Heey, In my iPad application I have a UIPopoverController with a UIViewController containing some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.