0

I am trying to create a graphing calculator for the iPad. On the portrait view there is a normal calculator and when rotated it updates the view to a graphing calculator.

My problem is that I have two views, one portrait and one landscape. The landscape has a graph but once the landscape has rotated to portrait and back the graph doesnt update itself with setneedsdisplay

Any help would be appreciated.

Thanks.

azi_santos
  • 105
  • 1
  • 12

1 Answers1

1

If I got you right, the graph view should only be displayed in landscape and not be rotated to portrait. So I think that's the main issue here.

There are settings for that in your projects -> target -> summary, there you can choose which orientations your app is supporting.

And in code in your viewcontrollers you can add these methods, to limit that specific viewcontroller to some orientation: Interface orientation in iOS 6.0

Community
  • 1
  • 1
d4Rk
  • 6,622
  • 5
  • 46
  • 60