2011-12-16 179 views
1

因爲我需要一個更自定義的UIAlertView,我正在使用。我的問題在於,即使我已禁用它,它也可以使設備以任何方向旋轉。TSAlertView啓用設備旋轉

在AlertView出現之前,風景模式被禁用,但當我呼叫show時,任何方向都是可能的。

這是怎麼回事?我沒有UIAlertView的這種行爲。

回答

0

轉到@implementation TSAlertViewController和檢查shouldAutorotateToInterfaceOrientation

@implementation TSAlertViewController 
- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation 
{ 
    return NO; 
}