iOS开发:iOS TableViewCell自定义分割线
来源:互联网 发布:mac怎么下b站视频 知乎 编辑:程序博客网 时间:2024/05/16 05:09
实现如下:
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开发:iOS TableViewCell自定义分割线
- iOS开发:iOS TableViewCell自定义分割线
- iOS TableViewCell自定义分割线
- TableViewCell自定义分割线
- TableViewCell自定义分割线
- TableViewCell自定义分割线
- ios TableViewCell的分割线
- ios tableviewcell分割线左边有空白
- tableViewCell自定义分割线效果
- ios开发笔记之如何让tableViewCell的分割线顶格
- IOS TableViewCell分割线设置和隐藏多余cell
- iOS tableViewCell设置分割线从最左端开始
- iOS 【UIKit-实现tableViewCell间的全屏分割线】
- iOS开发中如何自定义tableView的分割线
- iOS开发技巧-tableView去掉多余的空行分割线,自定义Cell分割线
- ios开发技巧之tableView去掉多余的空行分割线 自定义cell分割线
- iOS开发技巧-tableView去掉多余的空行分割线,自定义Cell分割线
- iOS中 自定义cell分割线/分割线偏移
- switch...case语句
- android使用CheckedTextView搭配listview完成选择列表
- jQuery下级菜单
- Android中WebView调用拨号盘
- HDU 4411 Arrest 最小费用最大流(题意+建图)
- iOS开发:iOS TableViewCell自定义分割线
- Linux命令TR
- 【OC刨根问底】-Runtime简单粗暴理解
- Fragment的使用
- JAVA语言中的引用类型
- linux下的C语言开发(makefile编写)
- iOS storyboard约束加载webView自适应高度
- PL/SQL对象
- Percona Toolkit