0
我已經編寫了一個用於縮放的代碼UIImageview
。我的問題是imageview在iPhone 4中正確縮放,但不是在iphone4s中。UIViewContentModeScaleAspectFilter UIimageview在iphone 4中正常工作,但不在iphone4s中
我的代碼如下:
UIImageView *imgBG1 = [[UIImageView alloc]init];
[imgBG1 setImageWithURL:url placeholderImage:nil];
imgBG1.contentMode = UIViewContentModeScaleAspectFit;
imgBG1.autoresizingMask = (UIViewAutoresizingFlexibleWidth |
UIViewAutoresizingFlexibleHeight);
[scrlView addSubview:imgBG1];
請注意,我從攝像頭捕獲的圖像和分配該圖像imgBG1。
任何幫助,將不勝感激。
嘗試不同的autoResizing屬性。它應該工作。什麼是操作系統版本? –
該版本是6.1.3 – NiravPatel