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