IOS tableVIewcell横线左端对其_移动开发_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > 移动开发 > IOS tableVIewcell横线左端对其

IOS tableVIewcell横线左端对其

 2015/4/29 12:48:52  没落云端  程序员俱乐部  我要评论(0)
  • 摘要:需要咋tableview初始化及绘制单元格代理中添加如下代码://初始化添加self.tableView_chose=[[UITableViewalloc]init];if([self.tableView_choserespondsToSelector:@selector(setSeparatorInset:)]){[self.tableView_chosesetSeparatorInset:UIEdgeInsetsZero];}if([self
  • 标签:view iOS

需要咋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];
    }
    
}

发表评论
用户名: 匿名