iOS 7 UIImagePicker preview black screen

前端 未结 3 1648
独厮守ぢ
独厮守ぢ 2020-12-01 08:09

When i try to load camera from my code, camera preview is black. If I wait for 10-20 seconds it will show real camera preview. I found several questions and some of them sug

3条回答
  •  遥遥无期
    2020-12-01 08:33

    Had this myself - it happens if something is running on the main dispatch thread - are you resizing images by any chance?

    It puts the preview onto the main thread and if something is using it, you get a black screen. It's a bug and the workaround is to either take over the main thread or to disable the photo picker until the queue is free

提交回复
热议问题