0
我想从相机拍照风景模式,我想在肖像模式中显示该图像iOS6。我无法在纵向模式下旋转图像。如何将风景图像转换为IOS6中的portrate图像?
我想从相机拍照风景模式,我想在肖像模式中显示该图像iOS6。我无法在纵向模式下旋转图像。如何将风景图像转换为IOS6中的portrate图像?
你想旋转,那么你要做的旋转图像?
如果你想只显示它在视图中,UIImageView
包装它,旋转ImageView的并插入到视图:
-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
UIImage* image = [[info objectForKey: UIImagePickerControllerOriginalImage] fixOrientation];
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
imageView.transform = CGAffineTransformMakeRotation(M_PI * 90/180);
[self.view addSubview:imageView];
}