How to implement action in didSelectRowAtIndexPath of UITableview?
Posted
by
Sumana Mehta
on Stack Overflow
See other posts from Stack Overflow
or by Sumana Mehta
Published on 2012-06-18T03:06:20Z
Indexed on
2012/06/18
3:16 UTC
Read the original article
Hit count: 173
On my view, I used to have few buttons and each button had an action associated with it.
UIButton *testButton = [[UIButton alloc] initWithFrame:CGRectMake(120,300,90,90)];
[testButton setBackgroundImage:[UIImage imageNamed:@"test.jpg"] forState:UIControlStateNormal];
[testButton addTarget:self.view action:@selector(gotoProd:) forControlEvents:UIControlEventTouchUpInside];
[testButton addt
[scrollView testButton];
But now I am trying to replace all those buttons with the tableview with rows. I was able to populate the rows and I know one needs to use didSelectRowAtIndexPath for handling on select event of the cell. But how can I implement action:@selector(gotoProd:) in tableviews ?? Any help will be greatly appreciated.
© Stack Overflow or respective owner