Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Got wrong Indexpath when clicked Button inside SubRowAtIndexPath #27

Open
kirti301290 opened this issue Feb 11, 2015 · 1 comment
Open

Comments

@kirti301290
Copy link

Hi

i am using this control is works fins but facing one issue i have added one button in cellForSubRowAtIndexPath when i clicked button the i got wrong row and subrow below is mu code

  • (UITableViewCell *)tableView:(UITableView *)tableView cellForSubRowAtIndexPath:(NSIndexPath *)indexPath

{

UIButton btn=(UIButton)[cell.contentView viewWithTag:15];

[btn addTarget:self action:@selector(DeleteClicked:) forControlEvents:UIControlEventTouchUpInside];

}

-(void)DeleteClicked:(UIButton*)sender

{

CGPoint point=[sender convertPoint:CGPointZero toView:tbl_Preview];

indexpath=[tbl_Preview indexPathForRowAtPoint:point];

// i got wrong indexpath

}
Please help me
thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants