iOS camera preview and capture photo with AVFoundation framework.