我正尝试在风景模式下从相机拍照,我想在 iOS6 中以人像模式显示该图像。我无法以纵向模式旋转图像。
答案 0 :(得分:0)
你想旋转,然后你要用旋转的图像做什么?
如果您只想在视图中显示它,请将其包装在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];
}