2012-09-19 21 views
0

我正在製作使用相機的應用程序。 一切工作正常,但是當我開始在UIImageView上添加捕獲的圖像時,它會自動調整尺寸爲UIImageView的尺寸。Objective-C:捕捉後使用原始圖像大小

我想要它做的是,使用捕獲的圖像的原始大小。

這裏是我的代碼:

- (void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info 
{ 
    UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage]; 
    [insertPhoto1 setImage:image]; 
    [self dismissModalViewControllerAnimated:YES]; 
} 

回答

1

的問題是用的ImageView的contentMode:

insertPhoto1.contentMode=UIViewContentModeCenter; 
+0

的感謝!它現在正在工作! –

相關問題