开发者

UIViewController - orientation changes don't get reported

开发者 https://www.devze.com 2023-02-01 11:38 出处:网络
In my U开发者_运维知识库IViewController subclasses, I impliment - (void)didAnimateFirstHalfOfRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation, but it never gets called, al

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消