【发布时间】:2012-02-23 20:47:35
【问题描述】:
我需要以编程方式选择一个 UITableViewCell,我试过这个:
NSIndexPath *selectedCellIndexPath = [NSIndexPath indexPathForRow:0 inSection:0];
[table selectRowAtIndexPath:selectedCellIndexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
但是,它只会在视觉上选择单元格,并且不会在 didSelectRowAtIndexPath 中选择该单元格,除非您实际点击该单元格。
任何想法,有没有人经历过这个或有想法来解决这个问题或以不同的方式处理它?
【问题讨论】:
标签: iphone objective-c ipad uitableview