Uitableview 使用故事板中的SDWebImage在自动布局中查看图像
我没有运气得到一个图像,它的Uitableview 使用故事板中的SDWebImage在自动布局中查看图像,uitableview,uiimageview,storyboard,sdwebimage,Uitableview,Uiimageview,Storyboard,Sdwebimage,我没有运气得到一个图像,它的UIImageView在我的自定义UITableViewCell中显示正确的大小。图像是正确的,但它在UITableViewCell中的位置不是,甚至不是很近 我没有足够的声望点来发布图片 我已经添加或建议了所有建议的限制条件Xcode 6,但是图像显示得很大,并且在我的UITableViewCell中的所有内容前面 这是我唯一与之相关的代码 ViewController.m self.tableView.rowHeight = UITableViewAuto
UIImageView
在我的自定义UITableViewCell
中显示正确的大小。图像是正确的,但它在UITableViewCell
中的位置不是,甚至不是很近
我没有足够的声望点来发布图片
我已经添加或建议了所有建议的限制条件Xcode 6,但是图像显示得很大,并且在我的UITableViewCell
中的所有内容前面
这是我唯一与之相关的代码
ViewController.m
self.tableView.rowHeight = UITableViewAutomaticDimension;
self.tableView.estimatedRowHeight = 600.0;
NSString *imageURL = [NSString stringWithFormat:@"%@", standardResolutionLocal.url];
__weak UITableViewCell *wcell = api2Cell;
[wcell.imageView
sd_setImageWithURL:[NSURL URLWithString:imageURL]
placeholderImage:[UIImage imageNamed:@"320x180.gif"]
];
- (void)layoutSubviews {
[super layoutSubviews];
[self.imageViewPic setTranslatesAutoresizingMaskIntoConstraints:YES];
}
CustomTableViewCell.m
self.tableView.rowHeight = UITableViewAutomaticDimension;
self.tableView.estimatedRowHeight = 600.0;
NSString *imageURL = [NSString stringWithFormat:@"%@", standardResolutionLocal.url];
__weak UITableViewCell *wcell = api2Cell;
[wcell.imageView
sd_setImageWithURL:[NSURL URLWithString:imageURL]
placeholderImage:[UIImage imageNamed:@"320x180.gif"]
];
- (void)layoutSubviews {
[super layoutSubviews];
[self.imageViewPic setTranslatesAutoresizingMaskIntoConstraints:YES];
}
我通过CocoaPods使用ios8、xcode6和SDWebImage。任何帮助都将不胜感激,谢谢 选择您的图像视图,并根据需要修改内容模式-也许Aspect Fit会适当地对其进行缩放。如果它看起来位置正确,但继续延伸到图像视图边界之外,请启用“剪辑到边界”。您可以修复UIImageView大小。ImageView内容模式-方面匹配