2010-04-18 66 views
0

我一直在試圖構建一個看起來類似於「股票」應用程序(驚喜)。我想要的是將滾動條放在我的圓形表格視圖之外,如下圖所示,但剪切單元分隔符。你可以看到它們如何重疊滾動條,這很煩人。我無法弄清蘋果如何將滾動條放在看起來像是在桌子外面的地方。有任何想法嗎? (抱歉,由於我是新用戶,因此無法嵌入圖像)。剪輯UITableView單元的分隔符

Scroller Problem Image

回答

1

您可能會得出自己的分隔符在UITableViewCell中的方法的drawRect:

- (void)drawRect:(CGRect)rect { 
    CGContextRef ctx = UIGraphicsGetCurrentContext(); 

    CGContextSetRGBStrokeColor(ctx, 1.0f, 1.0f, 1.0f, 1.0f); 
    CGContextSetLineWidth(ctx, 1.0f); 

    CGContextMoveToPoint(ctx, 0, self.bounds.size.height); 
    CGContextAddLineToPoint(ctx, self.bounds.size.width - 20, self.bounds.size.height); 

    CGContextStrokePath(ctx); 
    [super drawRect:rect]; 
} 
+0

這就是絕招!謝謝! – Drewsmits 2010-04-20 05:51:39

相關問題