嗨,我有一个问题,在我的设备开始旋转时,我AppDelegate
使用beginGeneratingDeviceOrientationNotifications
了开始通知我的方法。如果我手持 ipad,它可以正常工作,但是当它放在桌子上时,它不能按预期工作。它会触发UIDeviceOrientationUnknown
通知。此通知也会在 UI 启动后启动,而不是在启动画面上。
以下是我的代码:
if([[[PulseUIFactory Factory] GetUICreator] IsIPad])
{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged:) name:UIDeviceOrientationDidChangeNotification object:nil];
}
current device stars giving proper values.
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
然后在我启动我的用户界面的地方
[self Launch_UI];
但是通知在[self Launch_UI];
通话后开始响应,即使通知在其通话之前已注册...
请任何帮助都是可观的!!!