Does the UIImagePickerController have a black bar at the bottom by default?

I have a simple UIImagePickerController where I hide the camera controls and set the sourceType to the camera. This opens a live preview right now, but at the bottom of the preview window is a black bar with a height of 50 pixels. Any idea how to get rid of this?

+7
iphone uiimagepickercontroller
source share
2 answers

Thanks to Usman for the link. The attitude seems to be slightly different from what is offered on the blog. The 1.23 ratio works for iPhone 4 and 4s. In addition, in order to maintain aspect ratio, I suggest scaling both x and y.

picker = [[UIImagePickerController alloc] init]; picker.sourceType = sourceType; picker.delegate = self; picker.allowsEditing = NO; picker.showsCameraControls = NO; CGAffineTransform cameraTransform = CGAffineTransformMakeScale(1.23, 1.23); picker.cameraViewTransform = cameraTransform; 
+4
source share

I believe this is due to the difference in the proportions of the camera and the screen of the iPhone.

0
source share

All Articles