2012-06-08 51 views
-1

我正在研究遠程桌面協議,在這個我面臨很多問題。 你們真的很好,在很多危急情況下幫助我。如何使我的視圖與設備方向一起旋轉?

我的問題是這樣的: -

如果我點擊任何按鈕連接到RDP後,如果我想將它旋轉不happing

我做shouldAutorotateToInterfaceOrientation是的,仍然是相同的設備

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 

    return YES; 
} 
+0

您的連接請求正在阻止您的UI。所以如果您在不同線程中發送連接,而不是在主線程中,則更好。 –

回答

1

在陣 「支持的接口方向」 下的Info.plist文件,你可以補充一點:

<key>UISupportedInterfaceOrientations</key> 
<array> 
    <string>UIInterfaceOrientationPortrait</string> 
    <string>UIInterfaceOrientationLandscapeLeft</string> 
    <string>UIInterfaceOrientationLandscapeRight</string> 
    <string> UIInterfaceOrientationPortraitUpsideDown</string> 
</array> 

希望這有助於!

+0

我已經添加了這個..但仍然是相同的結果。 –

+1

這是你要找的答案嗎?如果沒有你接受這個答案?現在沒有人會因爲認爲問題已經解決而給你另外的答案 –

相關問題