6条回答 默认 最新
- mifit 2015-10-29 08:44关注
要加些手段才能使分割线左靠
//分割线靠左
if ([self.tableView respondsToSelector:@selector(setLayoutManager:)]) {
[self.tableView setLayoutMargins:UIEdgeInsetsZero];
}
if ([self.tableView respondsToSelector:@selector(setSeparatorInset:)]) {
[self.tableView setSeparatorInset:UIEdgeInsetsZero];
}//解决分割线右移15像素问题,步骤2
-
(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{//UIEdgeInsetsMake(20, 0, 0, 0)
if ([cell respondsToSelector:@selector(setSeparatorInset:)]) {
[cell setSeparatorInset:UIEdgeInsetsZero];
}//tableView.separatorColor = [UIColor colorWithHex:@"eeeeee" alpha:1.0];
if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
[cell setLayoutMargins:UIEdgeInsetsZero];
}
}
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报 -
悬赏问题
- ¥15 vhdl+MODELSIM
- ¥20 simulink中怎么使用solve函数?
- ¥30 dspbuilder中使用signalcompiler时报错Error during compilation: Fitter failed,求解决办法
- ¥15 gwas 分析-数据质控之过滤稀有突变中出现的问题
- ¥15 没有注册类 (异常来自 HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
- ¥15 知识蒸馏实战博客问题
- ¥15 用PLC设计纸袋糊底机送料系统
- ¥15 simulink仿真中dtc控制永磁同步电机如何控制开关频率
- ¥15 用C语言输入方程怎么
- ¥15 网站显示不安全连接问题