自定义的分割线
来源:互联网 发布:入侵棋牌游戏数据库 编辑:程序博客网 时间:2024/04/29 15:40
这是自定义的cell里面要添加的方法,前提是写了去掉系统的分割线
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
//自定义的分割线
- (void)drawRect:(CGRect)rect{
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, [UIColor clearColor].CGColor);
CGContextFillRect(context, rect);
//上分割线,
CGContextSetStrokeColorWithColor(context, [UIColor colorWithHexString:@"ffffff"].CGColor);
CGContextStrokeRect(context, CGRectMake(5, -1, rect.size.width - 10, 1));
//下分割线
CGContextSetStrokeColorWithColor(context, [UIColor colorWithHexString:@"e2e2e2"].CGColor);
CGContextStrokeRect(context, CGRectMake(5, rect.size.height, rect.size.width - 10, 1));
}
0 0
- 自定义的分割线
- 自定义ListView的分割线
- 自定义recycler的分割线
- RecyclerView的自定义分割线
- RecyclerView的自定义分割线
- iOS 自定义UITableViewCell的分割线
- RecyclerView的自定义万能分割线
- Android自定义带分割线的GridView
- 自定义RecyclerView的网格分割线
- RecyclerVieW自定义华丽的分割线
- Recyclerview添加自定义的虚线分割线
- Android recyclerView的自定义分割线
- ListView自定义分割线
- TableViewCell自定义分割线
- TableViewCell自定义分割线
- UITableViewCell自定义分割线
- UITableViewCell自定义分割线
- 自定义cell分割线
- python程序--实现zip压缩
- IOS viewWithTag
- SharedPrefs工具类
- NSUserDefaults
- poj-3687-Labeling Balls
- 自定义的分割线
- JavaScript和OC交互
- 2分钟快速集成支付宝快捷支付
- LBS中从数据库查询某经纬度2KM范围内的数据 - 针对大数据量的性能优化
- Windows和Mac下adb找不到设备的解决方法
- CodeForces 411B Multi-core Processor
- 李嘉诚内地套现700亿 转型投资大数据新媒体?
- ListView(ScrollView)嵌套ListView、GridView显示不全,内容大于一行计算的高度不正确的解决办法
- ios Xcode7.2下创建本地化语言Localizable.strings