Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


Christian Idylle
Christian Idylle
5,583 Points

UIImagePickerController view always reappears after picking an image

I'm following the videos step by step and at stage 4, Capturing Photo and Video using UIImagePickerController I run the simulator then tap on camera tab which I then pick a photo. After selecting a photo the view is dismissed, however unlike what is shown in the video, the image picker instantly reappears again. It seems it has to do with the fact that after the image picker is dismissed (in didFinishPickingWithInfo) the viewWillAppear method is called again when the Recipients tabviewcontroller is shown again.

Why is it that in the video when the user taps the image picker is not shown again? I followed pretty much the code line by line.

Any help will be appreciated.

1 Answer

Hey christian,

you simple have to dismiss the picker, i Don't know what video that is from but the code i used in my project was,

[picker dismissViewControllerAnimated:YES completion:nil];

this should solve it, if it doesn't let me know.

Happy hacking Kai.