3

I'm working on an iPhone / iPad app with several navigation controllers. When I click a back button of a view while the device is in landscape mode, the previous view scrolls vertically into the screen, instead of scrolling horizontally as usual.

Push animations always work horizontally, as it should be.

What could be causing this weird problem?

Thanks,

Adrian

poupou
  • 43,413
  • 6
  • 77
  • 174
Adrian Grigore
  • 33,034
  • 36
  • 130
  • 210

1 Answers1

4

Are you sure the view controller, you're getting back to, is set to deal with rotation properly ?

I had a similar issue using MonoTouch.Dialog until I added Autorotate = true; to every (non-leaf) DialogViewController inside my application.

poupou
  • 43,413
  • 6
  • 77
  • 174
  • Yup, that was exactly the problem. And I am also using Monotouch dialog :-). Thanks a lot! – Adrian Grigore Oct 12 '11 at 23:18
  • For those not using Monotouch, you just need to make sure your view controller overrides `shouldAutorotateToInterfaceOrientation:` and returns `YES` for the orientation you're in before tapping the back button. – Jesse Bunch Mar 03 '12 at 06:26