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

General Discussion

Sean Lee
Sean Lee
5,196 Points

tabBarController setSelectedIndex

[self.tabBarController setSelectedIndex:0]; // goes to inbox tab (first tab is 0)

How would you call a view after canceling Image Picker if you didn't have a tab and want it to show a View Controller?

1 Answer

Stone Preston
Stone Preston
42,016 Points

if you are using storyboards you would use a segue from the viewController that presents the imagePicker to your other viewController you want to show when its canceled.

if you are not using storyboards you would use something like

ViewController *viewController = [[ViewController alloc] init];    
[self presentViewController:viewController animated:YES completion:nil];