我在我的UIViewController中有下面的代碼,我正在測試設備中的iOS 5和兩個simultor。與shouldAutorotateToInterfaceOrientation有問題
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
if (IS_IPHONE){
return interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown;
} else {
return YES;
}
}
我把一個斷點,它確實被調用,但它仍然旋轉到風景。爲什麼是這樣?