UIViewController - orientation changes don't get reported
In my U开发者_运维知识库IViewController 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.
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.
精彩评论