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.
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?
I solved the same problem by hiding the navigation bar:
[navi setNavigationBarHidden:YES];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With