views:

222

answers:

1

Not sure if 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!

A: 

Implement -didRotateFromInterfaceOrientation: in your UIViewController subclass. Put the -didRotate: stuff there, or call it.

KennyTM
Thank you, that worked like a charm. So there really is no reason to ever use the NSNotificationCenter approach, is there?
carloe
@carloe: That approach is not the right tool in your case.
KennyTM