I just wanted to show up another possibility without subview fiddling.
There are system notifications for the changes in the CameraPicker. They are not documented either (as the subview structure). So they are also subject to change. BUT you get them.
You can register for them using no name:
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(notificationReceived:) name: nil object: nil];
We get some interesting (selfexplaining) notifications here:
PLCameraControllerPreviewStartedNotification
PLCameraViewIrisAnimationWillBeginNotification
PLCameraViewIrisAnimationDidEndNotification
Recorder_DidStartPreviewing
Recorder_SourceStarted
Recorder_WillCapturePhoto
Recorder_DidCapturePhoto
Recorder_PhotoStillImageSampleBufferReady
Recorder_DidStopPreviewing
_UIImagePickerControllerUserDidCaptureItem // Photo was taken, preview is shown
_UIImagePickerControllerUserDidRejectItem // Repeat was pressed, camera is shown again
You could use them, to trigger your overlayviews hidden state or anything else.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…