码迷,mamicode.com
首页 > 移动开发 > 详细

IOS tableVIewcell横线左端对其

时间:2015-04-29 13:28:54      阅读:138      评论:0      收藏:0      [点我收藏+]

标签:

需要咋tableview初始化及绘制单元格代理中添加如下代码:

//初始化添加

self.tableView_chose =[ [UITableView alloc] init];

 if ([self.tableView_chose respondsToSelector:@selector(setSeparatorInset:)]) {
        [self.tableView_chose setSeparatorInset:UIEdgeInsetsZero];
    }
    if ([self.tableView_chose respondsToSelector:@selector(setLayoutMargins:)]) {
        [self.tableView_chose setLayoutMargins:UIEdgeInsetsZero];
    }

//绘制表格代理添加

-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{
    
    if ([cell respondsToSelector:@selector(setSeparatorInset:)]) {
        [cell setSeparatorInset:UIEdgeInsetsZero];
    }
    if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
        [cell setLayoutMargins:UIEdgeInsetsZero];
    }
    
}

IOS tableVIewcell横线左端对其

标签:

原文地址:http://www.cnblogs.com/moluoyunduan/p/4465604.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!