使用UITableView在Tweetie中快速滚动

Cod*_*nts 5 iphone cocoa-touch uitableview

2008年12月12日,Tweetie iPhone应用程序的制造商发布了一个很好的例子,说明他如何在没有通常需要的锯齿/粗糙的情况下完成UITableView滚动.他的示例代码适用于SDK的2.2版本,但是,当我编译为3.0时,我无法使单击突出显示在单个单元格上工作.任何人都知道需要从2.2 - > 3.0更新什么来让他的代码(完全)工作?

Cod*_*nts 6

在drawContentView中,将self.selected更改为self.highlighted

- (void)drawContentView:(CGRect)r
{
    CGContextRef context = UIGraphicsGetCurrentContext();

    UIColor *backgroundColor = [UIColor whiteColor];
    UIColor *textColor = [UIColor blackColor];

    if(self.highlighted)
    {
        backgroundColor = [UIColor clearColor];
        textColor = [UIColor whiteColor];
    }

     ... code continues ...

}
Run Code Online (Sandbox Code Playgroud)