嗨,我有一個問題, 在我的AppDelegate
我已經使用方法beginGeneratingDeviceOrientationNotifications
開始通知我當設備開始旋轉。 它工作正常,如果我手持我的iPad,但當它保留在桌子上它不會按預期工作。 它會觸發UIDeviceOrientationUnknown
通知。 此通知在UI啓動後不在啓動畫面上開始。設備在桌上時,UIDeviceOrientationDidChangeNotification不起作用?
下面是我的代碼:
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];
那麼一些在那裏我啓動我的UI作爲
[self Launch_UI];
但通知開始響應後[self Launch_UI];
呼叫即使通知其調用之前註冊...
請任何幫助是可觀的!