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

  • SEARCH
  • Home
  • 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 8263093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:59:00+00:00 2026-06-08T03:59:00+00:00

I need your help please. I have two different view controllers: 1. with a

  • 0

I need your help please.
I have two different view controllers:
1. with a button
2. with an image view.

I’m trying to pass the button’s image to the image view at the second view controller.
The prepareforsegue is being called but the image does not pass.
I attached my code:

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    if ([[segue identifier] isEqualToString:@"pushGuessLogo"])
    {
         GeneralGuess *vc = [segue destinationViewController];
          [self setLogoImageView:[[UIImageView alloc] initWithImage:self.logoImageSelected.imageView.image]];

        [vc setImageGuessView:self.logoImageView]; 
    }

}

ImageGuessView is the outlet of the image view at view controller number 2.

Thank you

  • 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-08T03:59:02+00:00Added an answer on June 8, 2026 at 3:59 am

    Someone answered this the other day but I’m too lazy to find the link. (wouldn’t it be great if SO also had a Knowledge Base which questions get promoted to, rather than endless questions that do not come up in a search).

    The gist is that the viewController’s view hierarchy is not yet set up at the point of prepareForSegue, so your ImageGuessView is nil at that point. What you can do is define a UIImage property on your GeneralGuess class and set that. Then in viewWillAppear load that image into your ImageGuessView.

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

Sidebar

Related Questions

please i need your help with an issue. I have two forms on my
Please I need your help with my script. I'm trying to insert values into
please I need your help with a Linq expression: I have nested objects with
I need your help please. I have a text file contains lines of lists,
Please I need your help with grabbing rows from a table and dynamic text
Please i need your help with how to include INDEXES in my tables, i've
I need your help with my script. What I'm trying t do is insert
I need your help. Say I have a code inside a for statement similar
I need your help with my database design. I'm trying to develop a Result
I really need your help since I have a frustrating problem. I'm downloading data

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.