Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Build a Self-Destructing Message iPhone App Capturing Photo and Video Using UIImagePickerController viewDidLoad and the View Controller Lifecycle

Szymon Kadłuczka
Szymon Kadłuczka
8,762 Points

Presenting view controllers on detached view controllers is discouraged.

When I launch Camera tab and choose a photo on a simulator, it shows Recipients tab just for a moment and then goes back to choosing photo from a library. I cannot access a table view.

In a console I get this message:

2014-11-03 16:23:43.578 Ribbit[23261:1175282] Presenting view controllers on detached view controllers is discouraged <CameraTableViewController: 0x7bc5fa50>.

What am I missing? I found some related problems on StackOverflow, and they are saying to place this line:

[self.view.window.rootViewController presentViewController:viewController animated:YES completion:nil];

When I run it on my phone, it works, but I get this message:

2014-11-03 16:33:47.771 Ribbit[4894:60b] Warning: Attempt to present <UIImagePickerController: 0x145a3980> on <UITabBarController: 0x14654fe0> while a presentation is in progress!

Any help?

Benjamin McMahan
Benjamin McMahan
6,679 Points

Were you ever able to find out any details on this?

1 Answer

Szymon, here is a full template for the social network application: Click Here.