0
我UIImageView
工作完美,但它被拉伸其UITableViewCell
的UIImageView伸展在iOS 8的故事板自動佈局
之外,我甩開了Instagram的API,這是612x612標準分辨率照片。我需要把它放在UIImageView
的自定義UITableViewCell
中,它將使用自動佈局來更改每個設備的UIImageView
的尺寸。
我不確定這是如何在Xcode 6 iOS 8中工作的,因爲我試過的東西到目前爲止還沒有工作,因爲圖像只是在設備視圖的範圍之外伸展。
任何幫助將不勝感激,謝謝!
CustomTableViewCell.m
- (void)layoutSubviews {
[super layoutSubviews];
[self.imageViewPic setTranslatesAutoresizingMaskIntoConstraints:YES];
}
ViewController.m
self.tableView.rowHeight = UITableViewAutomaticDimension;
self.tableView.estimatedRowHeight = 600.0;
NSString *imageURL = [NSString stringWithFormat:@"%@", standardResolutionLocal.url];
__weak MWebListTableViewCellTwo *mCell = api2Cell;
[mCell.imageViewPic
sd_setImageWithURL:[NSURL URLWithString:imageURLInstagram]
placeholderImage:[UIImage imageNamed:@"placeholder"]];
真棒,有道理,謝謝! – SRMR 2014-11-27 00:26:03