美文网首页ios 开发问题
设置tableViewCell的线的位置

设置tableViewCell的线的位置

作者: 口袋海贼王_ | 来源:发表于2015-04-28 12:05 被阅读320次

//设置cell的偏移量

- (void)tableView:(UITableView*)tableView willDisplayCell:(UITableViewCell*)cell forRowAtIndexPath:(NSIndexPath*)indexPath

{

if([tableViewrespondsToSelector:@selector(setSeparatorInset:)]) {

[tableViewsetSeparatorInset:UIEdgeInsetsMake(0, -10,0,0)];

}

if([tableViewrespondsToSelector:@selector(setLayoutMargins:)]) {

[tableViewsetLayoutMargins:UIEdgeInsetsMake(0, -10,0,0)];

}

if([cellrespondsToSelector:@selector(setLayoutMargins:)]) {

[cellsetLayoutMargins:UIEdgeInsetsMake(0, -10,0,0)];

}

}

相关文章

网友评论

    本文标题:设置tableViewCell的线的位置

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