Quantcast
Channel: User kubi - Stack Overflow
Viewing all articles
Browse latest Browse all 39

UIImagePickerController doesn't fill screen

$
0
0

screenshot

I'm adding a custom overlay to the UIImagePickerController and there is a persistant black bar at the bottom of the view. Here is my code to instantiate the controller.

- (UIImagePickerController *)imagePicker {    if (_imagePicker) {        return _imagePicker;    }    _imagePicker = [[UIImagePickerController alloc] init];    _imagePicker.delegate = self;    if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {        _imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;        _imagePicker.showsCameraControls = NO;        _imagePicker.wantsFullScreenLayout = YES;        _imagePicker.navigationBarHidden = YES;        _imagePicker.toolbarHidden = YES;    } else {        _imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;    }    return _imagePicker;}

The returned controller is displayed modally and works just fine (i.e. displays full screen) when I'm not hiding the camera controls.


Thanks to Ole's suggestion I got it working with this code:

// Resize the camera preview        _imagePicker.cameraViewTransform = CGAffineTransformMakeScale(1.0, 1.03);

A 3% increase in height worked just fine. When I add my custom toolbar at the bottom of the screen there is no longer a visible black bar across the window.


Viewing all articles
Browse latest Browse all 39

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>