我在iOS 5上有關shouldAutorotateToInterfaceOrientation的一個特殊問題。簡單地說,我的整個項目應該只處理Portrait,除了應該處理UIInterfaceOrientationMaskAllButUpsideDown的圖像查看器。在UIImagePickercontroller後禁用了shouldAutorotateToInterfaceOrientation
基本上,我把這個代碼在所有我viewControllers的:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation*)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
然後,我有一個視圖控制器稱爲PageViewController。有一個按鈕可以調用UIImapgePickercontroller。一旦圖像被選中,我dismissViewController(imagePicker),所以我回到PageViewController,我推動ImageViewController。
其中給出:
3
PageViewController - > ImageViewController
1 | A 2
V |
感謝您幫助。
ImagePickerController