Application freezes when trying to present rear camera on iPad

前端 未结 4 1719
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-02 19:46

The application that i am working on runs on both iPhone & iPad . One of the functionality that the application has, is to capture image from camera. I am using UIImageP

4条回答
  •  情书的邮戳
    2021-01-02 20:15

    You should check camera is available or not:

    if UIImagePickerController.isSourceTypeAvailable(.camera) {
        // Implement UIImagePickerController
    } else {
        // Show error message
    }
    

提交回复
热议问题