iOS 重新定义cell的分割线样式
来源:互联网 发布:用图表直观表达数据 编辑:程序博客网 时间:2024/06/06 11:40
实现如下:
UITableView中将分割线样式改为None
自定义UITableViewCell中复写- (void)drawRect:(CGRect)rect方法
UITableView中将分割线样式改为None
tableView.separatorStyle = UITableViewCellSeparator<wbr>StyleNone;</wbr>
自定义UITableViewCell中复写- (void)drawRect:(CGRect)rect方法
- (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentCont<wbr>ext(); CGContextSetFillColorWit<wbr>hColor(context, [UIColor clearColor].CGColor); CGContextFillRect(context, rect); //上分割线, CGContextSetStrokeColorW<wbr>ithColor(context, [UIColor colorWithHexString:@"ffffff"].CGColor); CGContextStrokeRect(context, CGRectMake(5, -1, rect.size.width - 10, 1)); //下分割线 CGContextSetStrokeColorW<wbr>ithColor(context, [UIColor colorWithHexString:@"e2e2e2"].CGColor); CGContextStrokeRect(context, CGRectMake(5, rect.size.height, rect.size.width - 10, 1)); }</wbr></wbr></wbr></wbr>
0 0
- iOS 重新定义cell的分割线样式
- tableView 的 cell 的分割线样式
- iOS TableView的cell分割线格式
- iOS tableView cell的分割线设置
- cell的分割线
- iOS 关于tableView cell的分割线的一些设置
- iOS 关于tableView cell的分割线的一些设置
- iOS 关于tableView cell的分割线的一些设置
- cell的分割线问题
- ios tableView隐藏多余的cell分割线separator
- iOS tableView去掉显示多余的cell分割线
- iOS 8下设置cell的分割线缩进separatorInset
- iOS uitableview中cell的分割线紧贴左边
- iOS-swift-tableview隐藏多余的cell分割线
- iOS 8下设置cell的分割线缩进separatorInset
- iOS-UITableView 右侧箭头+取消分割线+取消选中样式+自定义分割线(原生和自定义cell)
- iOS开发技巧-tableView去掉多余的空行分割线,自定义Cell分割线
- ios开发技巧之tableView去掉多余的空行分割线 自定义cell分割线
- Android中ListView中定义头条目
- AES加密
- 开机自动启动应用程序
- char最大值和最小值表示方法与左移右移
- web后台知识点整理
- iOS 重新定义cell的分割线样式
- µVision中使用SVCS菜单 中文译文
- 使用nc命令监听端口编写git的web hooks
- 数位dp专辑
- Xen, KVM Compare
- 2012年5月SAT香港真题解析
- GRE写作必备句型
- android开发
- datanode无法启动 或 DFS Used% :100 % 或 Live Nodes