0

The following code is the method that I use to take picture with and then send to Facebook using share kit. Problem is this causes images to be sent with a 90 degree rotation.The reason I know this is the code that is responsible for this is because if I upload an image from the iPhone gallery the image gets shared to Facebook normally.

 - (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
{
    [imagePickerController setSourceType:UIImagePickerControllerSourceTypeCamera];
}
// image picker needs a delegate,
[imagePickerController setDelegate:self];
// Place image picker on the screen
[self presentModalViewController:imagePickerController animated:YES];
 }
4

1 回答 1

0

The default orientation of a UIImagePickerController is landscape I believe. Therefore, you need to hack around with the image you obtain after taking the picture. There are many ways to do this - check out this link. There are several methods discussed there to normalize the orientation.

于 2013-03-13T21:21:27.283 回答