0
嗨,我是新來的iOS開發...的UIViewController方向設置
我已經在項目創建僅支持橫向only.For,我用這樣的
但是當我去打印鑑於尺寸
NSLog(@"%f--%f",self.view.frame.size.width,self.view.frame.size.height);
在日誌給它
768.000000--1024.000000
代替
1024.000000--768.000000
,也是我加入了代碼
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
BOOL res=((interfaceOrientation == UIInterfaceOrientationLandscapeLeft)|| (interfaceOrientation == UIInterfaceOrientationLandscapeRight));
return res;
}
我不知道如何解決這個problem.Please幫我在這
SO有這個問題的答案負載。看到這個例子:http://stackoverflow.com/questions/12650137/how-to-change-the-device-orientation-programmatically-in-ios-6 – bizsytes
我使用xcode5和ios7.0。它顯示錯誤'[UIDevice] setOrientation沒有Visible @Interface:'如何實現這個....? – sudheer