0
我做了一個應用程序,在那裏你可以拍照。之後會在視圖中顯示。我想展示整張照片,而不切割任何東西或伸展任何東西。UIImageView奇怪的伸展
bg = [[UIImageView alloc] initWithImage:self.bgImage];
bg.frame = self.view.frame;
[self.view addSubview:bg];
..後來..
bg.image = [info objectForKey:UIImagePickerControllerOriginalImage];
[bg addGestureRecognizer:tap];
bg.userInteractionEnabled = YES;
bg.clipsToBounds = YES;
bg.contentMode = UIViewContentModeScaleAspectFit;
圖像現在看起來是這樣的:
我簡直不明白這一點,當內容模式設置到UIViewContentModeScaleAspectFit。