美文网首页
iOS 中清理tableview表格下面的线对齐屏幕

iOS 中清理tableview表格下面的线对齐屏幕

作者: 橙园大菜 | 来源:发表于2016-08-19 23:11 被阅读15次

    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的滑动

    相关文章

      网友评论

          本文标题:iOS 中清理tableview表格下面的线对齐屏幕

          本文链接:https://www.haomeiwen.com/subject/lizbsttx.html