0
- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
return YES;
}
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
}
不工作,我不知道,爲什麼。 當我嘗試調試並旋轉設備時,這些方法不會被調用。shouldAutorotateToInterfaceOrientation not working
我只想檢測取向 如果方向=景觀 執行行動 其他 輪換執行動作b
非常感謝
你設定所有方向在您的項目設置支持? – Clafou 2012-04-02 16:28:35
是的,我已經在plist。 – iscavengers 2012-04-02 16:29:37
什麼是你的視圖層次結構?這應該是在頂視圖控制器 – Clafou 2012-04-02 16:41:16