Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

daproject85

macrumors member
Original poster
Apr 13, 2011
37
0
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:

23iigas.jpg


2qlsk13.jpg


Code:
- (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
 
Last edited by a moderator:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.