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.
saving a photo to an NSMutableDictionary in iPhone app
I have an app which has a MainViewController (MVC) and a DetailViewController (DVC).
From the MVC I use an NSMutableDictionary to load an image view and a text view in the DVC depending on which image in the MVC is tapped (kind of like a tableview. I also have an empty UIImageView in the DVC.
Inside the DVC I have a button to open the camera. i can take a photo and save it to the app's documents folder and it shows up in the empty UIImageView. However when I return to the MVC and go back to the same called DVC where the photo was displayed it is no longer displayed even though I know it has been saved into the documents. If I tap on a different image in the MVC and open a different DVC grouping I can take a photo but the problem is I don't know how to progressively name the saved images.
What I would like to do is have the photo taken in DVC #1 be saved as image #1 and show up every time I open DVC #1 and then when I open DVC #1 and take a photo it is saved as image #2 and stays displayed in it and so forth and so on. First off is this possible? And admitting that I am rather new to coding and I think here way over my head could someone help me accomplish this.
// Unable to save the image if (error) alert = [[UIAlertView alloc] initWithTitle:@"Error" message:@"Unable to save image to Documents." delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil]; else // All is well alert = [[UIAlertView alloc] initWithTitle:@"Success" message:@"Image saved to Documents." delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil];
//this is the view where the photo is shown in the DVC