1、首先确定是不是在管理这个表的controller中
2、在- (void)viewDidLoad 这个方法中调用
self.tableView.separatorInset=UIEdgeInsetsZero;
现在这里清理一次
3、然后再调用协议中的
- (void)tableView:(UITableView*)tableView willDisplayCell:(UITableViewCell*)cell forRowAtIndexPath:(NSIndexPath*)indexPath {
cell.layoutMargins=UIEdgeInsetsZero;
}
这个方法在进行清理一次就可以达到目的了
注意 3这个方法可以实现很多cell的特性
类如:
[UIView animateWithDuration:2.0 animations:^{
cell.transform=CGAffineTransformMakeScale(1.1,1.1);
}];
可以实现cell的滑动
网友评论