我不知道爲什麼設備方向不起作用。設備方向
在項目屬性:
在我的代碼有:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return ((interfaceOrientation == UIInterfaceOrientationPortrait) ||
(interfaceOrientation == UIInterfaceOrientationLandscapeLeft) ||
(interfaceOrientation ==UIInterfaceOrientationLandscapeRight));
}
我探討它在我的iPhone,並不會改變。
有什麼缺失?
預先感謝您
編輯(info.plist中)
支持的界面方向添加info.plist – Rajneesh071
您的設備上是否啓用了方向鎖? –
不,它沒有被鎖定,我也嘗試過在xcode中使用iphone模擬器 – user1256477