I am testing my iPhone application on an iOS 3.1.3 iPhone. I am selecting/capturing an image using a UIImagePickerController
:
UIImagePickerCont
If you enable editing, then the edited image (as opposed to the original) will be oriented as expected:
UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
imagePickerController.allowsEditing = YES;
// set delegate and present controller
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
UIImage *photo = [info valueForKey:UIImagePickerControllerEditedImage];
// do whatever
}
Enabling editing allows the user to resize and move the image before tapping "Use Photo"