【发布时间】:2016-04-02 09:23:12
【问题描述】:
我有一个UITableView 和UITableViewCell,我想将cell.imageView作为圈子。所以我在我的cellForrowAtIndex 中做到了这一点
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *simpleTableIdentifier = @"SimpleTableCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:simpleTableIdentifier];
}
cell.backgroundColor=[UIColor clearColor];
cell.imageView.layer.cornerRadius=cell.imageView.frame.size.width/2;
cell.imageView.layer.masksToBounds=YES;
cell.imageView.layer.borderWidth = 2.0f;
cell.imageView.layer.borderColor=[UIColor whiteColor].CGColor;
但是当加载表格时UIImages 是正方形,然后当我滚动它时它变成了圆圈。我怎么解决这个问题?
请帮我。
谢谢
【问题讨论】:
标签: ios objective-c uitableview uiimageview