Last active
January 3, 2016 21:48
-
-
Save lanqy/8523817 to your computer and use it in GitHub Desktop.
通过索引选中table cell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//select first row of first section | |
// from http://stackoverflow.com/questions/5918309/how-to-programmatically-tap-a-uitableview-cell | |
// from http://stackoverflow.com/questions/6118071/how-to-set-row-selected-by-default-in-uitableview | |
NSIndexPath* selectedCellIndexPath= [NSIndexPath indexPathForRow:0 inSection:0]; | |
[self.tableView selectRowAtIndexPath:selectedCellIndexPath animated:false scrollPosition:UITableViewScrollPositionMiddle]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment