TGPhotoPicker icon indicating copy to clipboard operation
TGPhotoPicker copied to clipboard

手机首次选择拍照,画面是全黑的,没办法操作

Open ETmanwenhan opened this issue 6 years ago • 1 comments

手机首次选择拍照时,等待的时间超过8秒,才有拍照画面。这是什么问题呢?求大神解答,谢谢!

ETmanwenhan avatar Mar 05 '18 08:03 ETmanwenhan

原来是线程问题。切换到UI线程进行更新UI就可以了。

TGPhotoPickerManager.shared.authorizeCamera { (status) in if status == .authorized{ DispatchQueue.main.async { self.setupCamera() self.setupUI() } } }

ETmanwenhan avatar Mar 06 '18 04:03 ETmanwenhan