我想有選擇索引UITableView
。 我已經寫了下面的代碼:獲取所選的索引的UITableView
NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0];
[tableView scrollToRowAtIndexPath:index
atScrollPosition:UITableViewScrollPositionTop
animated:YES];
這總是第一個項目工作。我想在indexPathForRow.
請幫忙。 謝謝。
如果您允許多個選擇,請考慮使用: - (NSArray *)indexPathsForSelectedRows – yura 2015-02-19 19:12:32
不再有效 – 2015-03-05 06:02:33
@Codecracker我測試了代碼。它仍然有效。 – yuchaozh 2016-05-23 21:16:51