0
我在我的Instagram應用中使用'PBJVISION',如觸摸錄製功能。它工作正常,但是當我嘗試從PBJCameraMode.Video切換到PBJCameraMode.Photo時,我收到一個錯誤;PBJVISION - 從cameraMode.Video切換到cameraMode.Photo時出錯
原因: - [AVCaptureStillImageOutput captureStillImageAsynchronouslyFromConnection:completionHandler:] - 不一致的狀態。'
我的代碼非常簡單;
@IBAction func changeCameraModeAction(sender: AnyObject) {
if recordFlag == false {
PBJVision.sharedInstance().maximumCaptureDuration = CMTimeMakeWithSeconds(kTotalVideoLength, kVideoFramePerSec)
PBJVision.sharedInstance().cameraMode = PBJCameraMode.Video
recordFlag = true
} else {
progressBarView.hidden = true
PBJVision.sharedInstance().cameraMode = PBJCameraMode.Photo
recordFlag = false
}
}
你能幫我嗎?
感謝, E.