0
寫的應用程序和Xcode。單擊將方向限制爲兩個肖像選項的按鈕。將plist文件更改爲僅允許兩個縱向方向。以編程方式提出限制。應用旋轉,即使我告訴它不要
當我構建應用程序到我的手機,它旋轉到兩個景觀和直立縱向。有沒有搞錯?
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return ((interfaceOrientation == UIInterfaceOrientationPortrait) ||
(interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown));
}
你能後的代碼? – redhotvengeance
添加了唯一的相關代碼。我覺得寫這個是多餘的plist中和按鈕進行了處理之後,但他們都不產生任何影響。 – Sneagan
更多的代碼需要被添加到調試這個問題 該視圖控制器初始化將有助於方法(注意:如果用筆尖驗證視圖控制器正確掛接和不使用通用的UIViewController) – DanZimm