I'm trying to pass an UIImage from one UIView in UITabBarController1 to another UIView in UINavigationController in UITabBarController2. In View1 i tried this:
Remember, view2 is in a NavigationController, and NavigationController is in a TabBarController. Extern Variable doesn't work, because these can't be used with UI Elements.
I also tried to declare an UIImage in the UploadModifyViewController.h and store the image with view2.image = storedImage; and then in the viewDidLoad of view2 i tried to set self.imageView = storedImage but this also didn't work.
Somehow the stored image gets lost when view2 gets initialized by its NavigationController.
I'm trying to pass an UIImage from one UIView in UITabBarController1 to another UIView in UINavigationController in UITabBarController2. In View1 i tried this:
Remember, view2 is in a NavigationController, and NavigationController is in a TabBarController. Extern Variable doesn't work, because these can't be used with UI Elements.
I also tried to declare an UIImage in the UploadModifyViewController.h and store the image with view2.image = storedImage; and then in the viewDidLoad of view2 i tried to set self.imageView = storedImage but this also didn't work.
Somehow the stored image gets lost when view2 gets initialized by its NavigationController.
Greetz
s4lfish
Instead of passing it to the property of imageView try to create a UIImage variable and pass the image to the UIImage that you have declared and instantiate it with your imageView.
But can u give me a hint how this would look like? I'm new to iOS development
I declare an UIImage in ... the UploadModifyViewController?
And in the viewDidLoad i try self.imageView instatiateWithImage:image ?
But can u give me a hint how this would look like? I'm new to iOS development
I declare an UIImage in ... the UploadModifyViewController?
And in the viewDidLoad i try self.imageView instatiateWithImage:image ?
Greetz
S4lfish
After passing the image from the previous controller to your UploadModifyViewController you can use self.imageView.image = myImage.
Your UIImage declaration must be synthesized.
2, Class: UploadTabBarController (only exists because i tried almost everywhere to store the image^^)
Here i'd like to store the Image, because i want to add some image description, GPS tag and so on in the other 2 Tabs of TabBarController, and gather all information in the TabBarController.
2, Class: UploadTabBarController (only exists because i tried almost everywhere to store the image^^)
Here i'd like to store the Image, because i want to add some image description, GPS tag and so on in the other 2 Tabs of TabBarController, and gather all information in the TabBarController.
In the viewDidLoad: self.imageView.image = chosenImage;
I'm not quite still familiar with the storyboard thing. Can you check if the UploadModifyViewController is properly initialize? You could use NSLog to show if the controller's state.