1

I have a modal view that has a UIToolbar at the top . In this view I present another modal view. The problem is that when the second view is dismissing the UIToolbar of the first modal view seems to slide under the app status bar, this does not happen when the firs modal view is presented, only when the second one is dismissed.

Any idea how to fix this?

The view frame changes when the view is redisplayed

2012-12-11 14:53:49.976 app[11225:907] toolbar frame: {{0, 0}, {320, 44}}
2012-12-11 14:53:49.979 app[11225:907] view frame: {{0, 20}, {320, 460}}
2012-12-11 14:54:07.496 app[11225:907] toolbar frame: {{0, 0}, {320, 44}}// here the second modal view is dismissed 
2012-12-11 14:54:07.498 app[11225:907] view frame: {{0, 0}, {320, 480}}

The app does not use full-screen ...

The first view controller is just a modal view

  [self performSegueWithIdentifier:@"SettingsSegue" sender:self];

the presented views are dismissed when the user taps a button

 [self dismissModalViewControllerAnimated:YES];

nothing fancy ... Hmm.. this problem happens when testing on device... it seems to work ok in the simulator

user1028028
  • 6,323
  • 9
  • 34
  • 59

1 Answers1

1

Does the view controller you're presenting respond to supportedInterfaceRotations and shouldAutorotate incorrectly? When presented modally, it's simpler to just not override those methods at all.

This happened to me - see this question and answer.

Community
  • 1
  • 1
Aaron Brager
  • 65,323
  • 19
  • 161
  • 287
  • Hmm damn ... that could be it ... the thing is my app uses all standard rotaions BUT only for the top view controller so on all the others (this one included) i added the auto rotation methods to cancel auto rotation except portrait ... hmm – user1028028 Dec 27 '12 at 14:05