iphone : how to stop shutter animation?

前端 未结 1 869
粉色の甜心
粉色の甜心 2021-01-17 05:10

I am having 2 issues.

1) I want to know how can I stop animation of shutter when camera is loaded ? I am using UIImagePickerController. I have referred many answer

1条回答
  •  一生所求
    2021-01-17 05:50

    Using a UIImagePickerController, there's nothing you can do about that initial shutter animation. It's actually there to hide the startup time. You can switch to using the AVFoundation and getting an AVCaptureVideoPreviewLayer, which has no shutter animation, but you still get a latency between asking for the feed to start and it starting. I'm no hardware expert but I assume the delay is because the power management unit normally has that whole subsystem powered down.

    Your code for showLibraryPicker looks more or less correct, though you may be calling presentModalViewController:animated: on the wrong actor. UIImagePickerController is a view controller, so if you haven't subclassed that (ie, the code you're writing is not itself part of the thing you have acting as a UIImagePickerController) then you'll want to do [pickerController presentModalViewController:...].

    0 讨论(0)
提交回复
热议问题