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 8885183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:14:47+00:00 2026-06-14T21:14:47+00:00

I have a storyboard app with two different ViewController. On the second ViewController I

  • 0

I have a storyboard app with two different ViewController. On the second ViewController I have a UIImageView and I would like to call that UIImageView on the first one. I’ve been looking for a solution but I can’t find anything that work for me.

@property(nonatomic, retain) IBOutlet UIImageView *pic;

I just want to be able to use that UIImageView on the other viewcontroller. I hope you can help me.

  • 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-14T21:14:48+00:00Added an answer on June 14, 2026 at 9:14 pm

    EDIT:

    yes you can try to set your UIImageView in prepare for segue. I have tried it and it seems to work. You would do it as follows:

    **I am assuming that the controller you are seguing to is called NewViewController
    **I am also assuming your NewViewController has a UIImageView called imageView

    -(void)prepareForSegue....
      {
       if ([segueIdentifier isEqual....])
           {
            NewViewController *newController=(NewViewController *)[segue destinationViewController];
    
            [[newViewController imageView]setImage:self.someUIImageFromCurrentClass];
            [[newViewController imageView]setNeedDisplay];
           }
      }
    

    and yes, you do have to create a UIImage in current class (in this case it’s self.someUIImageFromCurrentClass). That’s the point is that you’re taking an image from current ViewController (current class) and showing it in the ViewController you are seguing to.

    ORIGINAL:

    -(void) prepareForSegue: (UIStoryboardSegue *)segue sender:(id)sender
    {
      if ([segue.identifier isEqualToString:@"your segue name"])
         {
           [segue.destinationViewController setYourUIImage:self.someImageFromCurrentClass];
         }
    }
    

    be sure to import the .h file for the controller you’re seguing to.

    second, YourUIImage is an UIImage that is publicly declared in the controller you’re seguing to (like Michael mentioned).

    In the destination controller, you’ll want to grab that UIImage and set it as the image for you UIImageView:

    [self.myImageView setImage:YourUIImage]; // <-- you can do this in ViewDidLoad or ViewWillAppear
    

    that should get you going

    **Also I guess it’s worth mentioning is that a segue always creates a new instance of the controller you’re seguing to, which doesn’t exist before the segue, which is why you have to pass the image to it.

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

Sidebar

Related Questions

I have been trying to incorporate Core Data to a storyboard app that starts
WP 7.5 app. I have two Storyboard animations - one on image and another
I have an app that has two viewcontrollers Viewcontroller and OptionsViewController. Viewcontroller is the
I have this iPad app using Storyboard. There are some file that are marked
Im using Storyboard for most screens in my iPhone app. However, I have one
I have a two scene StoryBoard in my app - it uses an automatic
consider the following scenario: I have a storyboard-based app. I add a ViewController object
I'm working on a Universal app using storyboarding. I have 2 storyboard files. One
I created an app with two different calculator views, each one with a separate
I have an universal App with two storyboards: iPhone.storyboard iPad.storyboard Now I have views

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.