2010-04-01 118 views
0

不知道我是否可以正确解释这一点,但我试图执行方法设备定位动画完成。现在我有[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didRotate:) name:UIDeviceOrientationDidChangeNotification object:nil];,但立即触发。视图旋转动画完成后有没有办法让它调用didRotateiPhone:UIDeviceOrientation变更完成后执行代码

谢谢!

回答

0

在您的UIViewController子类中实现-didRotateFromInterfaceOrientation:。把-didRotate:的东西放在那里,或者叫它。

+0

谢谢,那就像魅力一样。所以真的没有理由使用NSNotificationCenter方法,是吗? – carloe 2010-04-01 19:38:05

+1

@carloe:这种方法不适合您的情况。 – kennytm 2010-04-01 19:39:34