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
Bradley White
21,285 Pointsview controller won't rotate after push segue
I have an app that opens up into a tableView with portrait orientation and its embedded in a nav controller. When I select a row, it goes to a specific view controller that I need to be set to landscape before the view appears.
Ive done A LOT of google for this answer and can't find an answer that works.
Ive tried shouldAutoRotate, willRotateToInterfaceOrientation, and willAnimateRotationToInterfaceOrientation methods in the viewDidLoad method for that viewController. None work.
What is going on?
1 Answer
Thomas Nilsen
14,957 PointsTry putting the code in
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
}