我需要以編程方式選擇一個UITableViewCell,我已經試過這樣:以編程方式'觸摸'UITableViewCell?
NSIndexPath *selectedCellIndexPath = [NSIndexPath indexPathForRow:0 inSection:0];
[table selectRowAtIndexPath:selectedCellIndexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
然而,僅在視覺上選擇該小區並沒有挑上所選取的didSelectRowAtIndexPath
除非你真正挖掘細胞。
任何想法,有沒有人遇到過這個問題,或有想法來解決這個問題或採用不同的方法?
謝謝。
的可能重複的[選擇的tableview行編程(http://stackoverflow.com/questions/2035061/select-tableview-row-programmatically) – 2012-02-23 20:55:25