在網(wǎng)上找到的其他方法都不可用,這個方法比較推薦
//默認選中第一行,并執(zhí)行點擊事件
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
[tableview selectRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] animated:YES scrollPosition:UITableViewScrollPositionTop];
if ([tableview.delegate respondsToSelector:@selector(tableView:didSelectRowAtIndexPath:)]) {
[tableview.delegate tableView:tableview didSelectRowAtIndexPath:indexPath];
}