I currently set the selected row of a UITable via selectRowAtIndexPath:animated:scrollPosition: and as described in the documentation, this does not call tableView:didSelectRowAtIndexPath: so I have set up a selector call to perform this action.
However, the end result is that the row in the table is highlighted, but not selected. When I touch the highlighted row, the font color changes to white.
Is there a way to not only highlight, but also have the row "selected" so tapping that row 开发者_如何学Pythonagain does not result in any changes or updates?
Try calling didSelectRowAtIndexPath directly and then scrolling to it. I have this in a UITableViewController and it works fine (and the selection event does not fire again when you tap on it, I just tested it). I'm wondering if there is some other code messing you up.
[self tableView:self.tableView didSelectRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
精彩评论