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];
}