0

In my UIViewController subclasses, I impliment - (void)didAnimateFirstHalfOfRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation, but it never gets called, although I have correctly implemented - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation and my views do get rotated.

ryyst
  • 9,193
  • 17
  • 67
  • 97
  • @JoePasq: Nope. It somehow solved itself, though... – ryyst May 13 '11 at 14:45
  • I have this problem also. I'm trying to change a subview managed by another view controller midway through rotation. Similar to iAds switching frame sizes in rotation. – JoePasq May 13 '11 at 14:51
  • @JoePasq: Well, make sure you do what whitman proposed in his answer. I don't know whether it solves the problem, but you should try it. – ryyst May 13 '11 at 15:11
  • I'm using device notifications to solve it. http://stackoverflow.com/questions/4273895/how-to-autorotate-a-subview-in-navigation-controller What he proposed is what the docs say, it should be right, I'm not sure what the underlying issue it. – JoePasq May 13 '11 at 15:19

1 Answers1

1

You must also implement willAnimateFirstHalfOfRotationToInterfaceOrientation for the did... to get called. I suspect the framework first tries to call the will... and if it doesn't find it implemented it assumes you didn't implement the did... either, and so never calls it.

pseudosudo
  • 5,920
  • 9
  • 37
  • 50