iPhone: Execute code after animation of UIDeviceOrientation change finishes
Not sure if开发者_JS百科 I can explain this correctly, but I am trying to execute a method device orientation animation finishes. Right now I have [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didRotate:) name:UIDeviceOrientationDidChangeNotification object:nil];
, but that triggers instantly. Is there a way to have it call didRotate
after the view rotation animation is completed?
Thanks!
Implement -didRotateFromInterfaceOrientation:
in your UIViewController subclass. Put the -didRotate:
stuff there, or call it.
精彩评论