2015-08-25 64 views
0

我将图像添加到表格视图单元格,但图像似乎向右缩进。我该如何调整它,以便触及细胞壁的左侧壁。单元格图像视图缩进

enter image description here

,你可以在上图中看到其是图标的左侧的一个白色的小空间。它不应该是他们的。

它被设置像这样:

 cell.imageView?.image = iconArray[indexPath.row] 

我怎样才能解决这个问题。有什么建议么。

回答

0

可以实现layoutSubviews .. 变化self.imageView.frame

- (void)layoutSubviews 
{ 
     [super layoutSubviews]; 

     self.imageView.frame = CGRectMake(0, 0, 40, 40); 
} 
相关问题