【发布时间】:2014-12-16 22:35:06
【问题描述】:
我的应用程序只有横向,我用这段代码拍照
@IBAction func shootPhoto(sender: UIBarButtonItem){
if UIImagePickerController.availableCaptureModesForCameraDevice(.Rear) != nil {
picker.allowsEditing = false
picker.sourceType = UIImagePickerControllerSourceType.Camera
picker.cameraCaptureMode = .Photo
presentViewController(picker, animated: true, completion: nil)
} else {
noCamera()
}
}
但是当我按下按钮时,我得到了这个错误
'UIApplicationInvalidInterfaceOrientation',原因:'支持的方向与应用程序没有共同的方向,并且[PLUICameraViewController shouldAutorotate]返回YES'
【问题讨论】: