2011-09-26 115 views
0

我有自定义的组表格单元格背景,我使用以下代码绘制表格单元格边框。边框显示正确,但始终显示为实线。无论如何要蚀刻/虚线?在下面的代码中需要修改什么?iPhone:自定义组表格单元格边框样式

-(void)drawRect:(CGRect)rect { 
    CGContextRef c = UIGraphicsGetCurrentContext(); 
    CGContextSetStrokeColorWithColor(c, [borderColor CGColor]); 
    CGContextSetLineWidth(c, 2); 
    ..... 

谢谢。

回答

1

参见CGContextSetLineDashhere。这可以让你设置各种破折号模式。