Hide/Show iPhone Camera Iris/Shutter animation

后端 未结 7 968
执笔经年
执笔经年 2020-12-05 06:00

I am not able to Hide the iphone Camera shutter opening animation for my app. I am using UIImagePickerController to access iphone camera and using my own overlay controllers

7条回答
  •  独厮守ぢ
    2020-12-05 06:48

    Using this answer as a starting point, I've finally solved this problem:

    NOTE: This is obviously not 3.3.1-compliant.

    1. Listen for the UINavigationControllerDidShowViewControllerNotification on your UIImagePickerController, and the PLCameraViewIrisAnimationDidEndNotification globally.

    2. Traverse the view hierarchy (starting at the main UIWindow) looking for the PLCameraView. Save the index of the view against the main UIWindow, as you'll need it later.

    3. Remove the PLCameraView from its superView. If desired, insert your own view at global index 0.

    4. When the iris animation is finished, remove your view and re-add the PLCameraView at its original index.

提交回复
热议问题