Salut là j'ai un problème, Dans mon AppDelegate
j'ai utilisé la méthode beginGeneratingDeviceOrientationNotifications
pour commencer à me notifier lorsque l'appareil commence à tourner. Cela fonctionne bien si je main-tenu mon ipad mais quand il est maintenu sur la table il ne fonctionne pas comme prévu. il déclenche la notification UIDeviceOrientationUnknown
. Cette notification est également lancée après le lancement de l'interface utilisateur sur l'écran de démarrage.UIDeviceOrientationDidChangeNotification ne fonctionne pas lorsque le périphérique est sur la table?
Voici mon code:
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];
puis certains où je lance mon interface utilisateur comme
[self Launch_UI];
mais la notification commence à répondre après [self Launch_UI];
appel, même si la notification est enregistrée avant son appel ...
S'il vous plaît toute aide est appréciable !!! Lorsque vous placez votre appareil sur une table, [[UIDevice currentDevice] orientation]
renverra UIDeviceOrientationFaceUp
.