Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID
Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.

Why is my image not being added?

lukeirvinlukeirvin Posts: 269Registered Users
Working on adding random images to another image.

Here's the gist: The user selects from a table which set of images they want to view. They then choose an image and the app should bring them back to the main viewController with the new image added. Then they can edit that new image (move, rotate, zoom).

I know that the image I select is there, but when I get popped back to the main viewController it comes up as nil.

Here's my code:

in my Image Picker:

UIButton *button = (UIButton *)sender;
_selectedImage = [_images objectAtIndex:button.tag];
AppDelegate *delegate = [[UIApplication sharedApplication] delegate];
[delegate.navigationController popToRootViewControllerAnimated:YES];

*** Here the selected image (which they are all placed in buttons) is saved to the _selectedImage. I then popToRootViewController

Here's my rootViewController:

in viewWillAppear:

stampedImage = _imagePicker.selectedImage;
_stampedImageView = [[UIImageView alloc] initWithImage:stampedImage];
..... more code for the imageView ....

**** Here the stampedImage is coming back as null ****

Previously, I did not have the middle part for the user to choose which set of images they wanted to see. Simply go straight to one set and the new image was being added with no issue at all.

What am I missing here?


Replies

Sign In or Register to comment.