07-21-2023, 09:47 PM
cell.show.tag=indexPath.row;
[cell.show addTarget:self action:@selector(showdata:) forControlEvents:UIControlEventTouchUpInside];
-(IBAction)showdata:(id)sender
{
UIButton *button = (UIButton *)sender;
UIStoryboard *storyBoard;
storyBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
SecondViewController *detailView = [storyBoard instantiateViewControllerWithIdentifier:@"SecondViewController"];
detailView.string=[NSString stringWithFormat:@"%@",[_array objectAtIndex:button.tag]];
[self presentViewController:detailView animated:YES completion:nil];
}
[cell.show addTarget:self action:@selector(showdata:) forControlEvents:UIControlEventTouchUpInside];
-(IBAction)showdata:(id)sender
{
UIButton *button = (UIButton *)sender;
UIStoryboard *storyBoard;
storyBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
SecondViewController *detailView = [storyBoard instantiateViewControllerWithIdentifier:@"SecondViewController"];
detailView.string=[NSString stringWithFormat:@"%@",[_array objectAtIndex:button.tag]];
[self presentViewController:detailView animated:YES completion:nil];
}