對於我的應用程序,我想讓設備旋轉,但顛倒。這工作正常。不過,我想從iOS6設備旋轉限制
景觀專門旋轉停止應用程序左 - >景觀權 - 反之亦然
如果有人想了解情況,這是因爲旋轉弄亂我的佈局,因爲他們每個從一個共同的點旋轉
我的iOS 5,我認爲會的工作,代碼是這樣的:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
NSLog(@"Rotating");
if((lastOrient == 3 && toInterfaceOrientation == 4) || (lastOrient == 4 && toInterfaceOrientation == 3)){
lastOrient = toInterfaceOrientation;
return NO;
}
lastOrient = toInterfaceOrientation;
return YES;
}
其中3 =景觀左,4 =景觀權
有關如何使用iOS6執行此操作的任何建議?或者完全不同的解決方案?
顯然你可以包括兩個實現(shouldAutorotateToOrientation和shouldAutorotate),它應該從ios6級聯下來 – dmoss18