Saturday, 30 May 2009

Manually call tableview's didSelectRowAtIndexPath?

Is it possible to manually call the tableview's didSelectRowAtIndexPath with, say, the row-nr 1?

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
// stuff
If so, how would you construct that call? Im a bit confused as to how to make a functioncall with parameters in obj-c. My guess would be:

[MyTableView didSelectRowAtIndexPath:1];
..since my viewcontroller both declares and sets to property "MyTableView" in .h, and synthezises it in .m.

But even though it compiles (with a warning that "UITableView may not respond to -"didSelectRowAtIndexPath"), it crashes pretty quickly.

No comments:

Post a Comment