2015-08-25 89 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); 
} 
相關問題