Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIImagePickerControllerEditedImage not matching image from image picker view

I am trying to use the square image displayed on the preview screen of the UIImagePickerController but the image always come out pushed down slightly.

See the following pictures.

enter image description hereenter image description here

I have imgPicker.allowsEditing = YES, and here is the code once the image is selected.

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
    UIImage *imageEdited = [info objectForKey:UIImagePickerControllerEditedImage];
    self.imgView.image = imageEdited;
    [picker dismissViewControllerAnimated:YES completion:nil];

}

The imgView has dimension of 320x320.

Any suggestions?

like image 650
weber Avatar asked Nov 12 '22 19:11

weber


1 Answers

I solved the same problem by hiding the navigation bar:

[navi setNavigationBarHidden:YES];
like image 70
Gowtham Avatar answered Nov 15 '22 07:11

Gowtham