1. 程式人生 > >[iOS] How to prevent table cell border to be cut by cell image?

[iOS] How to prevent table cell border to be cut by cell image?

調了1小時,試了好多方法,table view 的分隔線會被吃掉,而且每一行的長短不一樣,看起來超醜!

解法真是神奇..

Go to your table view controller and put these codes into viewDidLoad:

if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")) //should check version to prevent force closed
{
    self.tableView.separatorInset = UIEdgeInsetsZero;
}