0

In view controller, I have tableView and graphView. When I change the orientation of device to landscape mode, only the graphView should show up in the landscape mode. Please advice:

- (NSUInteger)supportedInterfaceOrientations
{
  return UIInterfaceOrientationLandscapeLeft;
}
- (BOOL)shouldAutorotate {

  return NO;
}
Racil Hilan
  • 24,690
  • 13
  • 50
  • 55
VJVJ
  • 435
  • 3
  • 21

1 Answers1

0

You should make your "graph view" a separate view controller and then have something like that: "Parent view controller" -[has as a child]-> "Graph view controller" and "Parent view controller" -[has as a child]-> "Table view controller". Once you have that done, you should have disabled rotations for the parent controller and for the table view controller, whilst enabled - for the graph view controller. If this setup seems confusing or the rotation handling callbacks aren't being called, please refer to this answer: https://stackoverflow.com/a/23821631/2799410.

Community
  • 1
  • 1
Arthur Gevorkyan
  • 2,069
  • 1
  • 18
  • 31