你好我的整个应用程序是横向而不是肖像,在一个屏幕中我使用了UIImagePickerController,所以我从Target的一般部署信息设置了Potrait,Landscape Left和Landscape Right。我在AppDelegate.swift中的代码是
let appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate
appDelegate.shouldRotate = false
picker?.allowsEditing = true
picker!.sourceType = UIImagePickerControllerSourceType.PhotoLibrary
self.presentViewController(picker!, animated: true, completion: nil)
我想旋转UIImagePickerController,所以当我想呈现UIImagePickerController时,这样做:
.css('max-width', '70px').css('max-height', '70px');
通过这段代码,我可以旋转UIImagePickerController。但现在的问题是当我呈现UIImagePickerController我的ViewController是LandscapeLeft并且在呈现UIImagePickerController之后我旋转我的设备并且UIImagePickerController也在旋转(这很好)并且在拾取图像后我解雇UIImagePickerController现在问题是viewcontroller在LandscapeRight Orientation中应该是LandscapeLeft因为当我呈现UIImagePickerController时它处于LandscapeLeft方向。对不起,我的英语请帮助我。