PDA

View Full Version : Device orientation problems with tab bar and navigation controller




daproject85
Sep 12, 2012, 01:26 PM
Hi Forum,

I am working on a iOS excersize and I seem to have a problem with the device orientation changing. Below are the list of my files and a picture of my storyboard (dont think posting all the code will be much help). I have implemented:

http://i47.tinypic.com/23iigas.jpg

http://i48.tinypic.com/2qlsk13.jpg


- (BOOL)shouldAutorotateToInterfaceOrientation (UIInterfaceOrientation)interfaceOrientation {

return YES;
}


in

TopPlacesTableViewController.m
PhotoListTableViewController.m
PhotoViewViewController.m
RecentPlacesTableViewController.m


now here is what happens so as the app starts the "TopPlaces tableview" shows and I am able to rotate to landscape more (GREAT!). Then I select a row and it segues into the next table (photo list) and eventually i select and image and its good (all while in landscape mode).

now if I start the same way in "top places" table select a row and go to Photo List table, and i rotate to portrait view I will not be able to rotate back to landscape. Even if i select a photo and segue into the "photo View" (where the image shows, photoview view controller) and i rotate the device into landscape it will not rotate.

So in conclusion if i start in Landscape and stick to it its good, but If anywhere in the middle (photo list table on wards) I rotate to portrait I will not be able to go to Landscape unless I go back to Top places table.

:) please help