I am working on an iOS app with a small table view in portrait mode. And I want this view to become something totally different in landscape mode. I haven’t coded it yet, but something like http://www.vertex42.com/ExcelArticles/Images/timeline/Timeline-for-Benjamin-Franklin.gif (It will be in a scroll view)
I’ve already read things like that: ” Trying to load new view upon orientation change ” but as my portrait view is a UITableView I don’t know how to set the portrait view…
I’m working with a UITableViewController subclass which is initiated by the AppDelegate.
Thanks for your answer and sorry for my poor English…
EDIT : The solution : You have to create a custom UIViewController with two views which will be the tableView’s delegate and data source. Then in
– (BOOL)shouldAutorateTo….
You set the “hidden” property to do what you want.
/!\ Don’t forget to initiate your tableView property and set its delegate and data source properties
If you want more flexibility, take out the
UITableViewControllerand put aUIViewControllerwith aUITableViewinside. As for the rotations, I would probably switch theUITableViewfor aUIScrollViewon the moment of the rotation.