Two simple alternative approaches, one (better) for iOS 7.x and one for earlier versions of iOS:
float zoomLevel = 2.0f;
if ([device respondsToSelector:@selector(setVideoZoomFactor:)]
&& device.activeFormat.videoMaxZoomFactor >= zoomLevel) {
// iOS 7.x with compatible hardware
if ([device lockForConfiguration:nil]) {
[device setVideoZoomFactor:zoomLevel];
[device unlockForConfiguration];
}
} else {
// Lesser cases
CGRect frame = captureVideoPreviewLayer.frame;
float width = frame.size.width * zoomLevel;
float height = frame.size.height * zoomLevel;
float x = (frame.size.width - width)/2;
float y = (frame.size.height - height)/2;
captureVideoPreviewLayer.bounds = CGRectMake(x, y, width, height);
}