一個小的變化多次,我使用UIDeviceOrientationDidChangeNotification調用的加速度
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(detectOrientation) name:@"UIDeviceOrientationDidChangeNotification" object:nil];
進行修改,在我的appdelegate一些看法。
但是,這被稱爲加速度計的最微小的變化。任何人都可以提出任何解決方法,以便它只在設備完全旋轉時才被調用。 謝謝
謝謝臧。將研究它。現在不在我的Mac上。 –
不知道這將如何工作,因爲它只會發佈兩次。此檢查應位於通知的選擇器中。 – Bot