Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Custom overlays create a GUI that floats over the live camera preview. You can add buttons and other user interface controls to snap photographs and dismiss the controller. Figure 7-5 shows a rudimentary overlay with two buttons: one for snapping a photo, the other (the small circled “X”) for dismissing the image picker controller. Notice the black bar behind the overlay and under the camera preview. The overlay is deliberately offset to highlight this bar. Hiding the standard controls leaves this black bar in place. You’ll want to design your overlay to best take advantage of this geometry.
Figure 7-5. Snapping photos with a custom image picker overlay.
Set the overlay by assigning a view to the picker’s cameraOverlayView property and hide the normal controls. When you present the picker, the custom overlay, not the built-in one, appears. You’ll want to match your custom camera overlay to the screen properties of the device you’re working with.