iphone - Sharing image between two view -


I am trying to learn basic and very important to developing decent iPhone apps. But I do not understand what I have not got. Here's the question:

I have a window project, which has 2 views - View 1, View 2 On each view (via IB) I removed an image view control. When I call the function in Scene 1, I want to set the image control image 2 of the view.

How do I do this?

There should be a simple way, but I have not managed to find an easy simple way to do it (and find a lot) to understand the least concept.

Thank you in advance - ME

You do not necessarily need to share the image . is it big? Are you downloading it? In other words, does it really need to be shared?

If this happens, you can instantiate the UIIm in your app representative and you can pass the controller to each view whenever you make it. Set a property for each visual controller for the image. Something like this:

  see Controller 1 * Controller 1 [[Viewer 1Iloc Init]; [Controller 1 set image: image]; [[Self-Navigation Controller] Push ViewController: Controller 1]; [Controller 1 release]; ViewController2 * Controller 2 = [[ViewController2 All Allocation]; [Controller 2 set image: image]; [[Self-Navigation Controller] Push ViewController: Controller 2]; [Controller 2 release];  

Then deodeload in the view of each view controller, you can set the image for your image View

  - (zero) viewDidLoad; [[Super Viewedload]; [[See image itself] set image: [self portrait]]; }  

I'm not sure how you are loading your view controller, but the above code assumes that you are using the navigation controller stack. If you need clarification for a different perspective, then let me know.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -