Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pushing the ViewController in customize Tableview Cell

I'm using Using Customize table cell and have a button action in that cell and tapping on that should take me to another ViewController, I'm using this code inside the button action but its not working out:

 PhotoViewController *photo = [[PhotoViewController alloc]initWithNibName:@"PhotoViewController" bundle:nil];
  [self.navigationController pushViewController:photo animated:YES];
like image 557
satishiOS25 Avatar asked Mar 05 '26 05:03

satishiOS25


1 Answers

Got the solution :-) thanks Created the IBOutlet and in cellForRowAtIndexPath method declared:

 cell.photoAlbum.tag = indexPath.row; [cell.photoAlbum addTarget:self 
action:@selector(photoAblumClicked:) forControlEvents:UIControlEventTouchUpInside]; 

and in the photoAblumClicked called the above code it's working fine Thanks :-)

like image 107
satishiOS25 Avatar answered Mar 06 '26 19:03

satishiOS25



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!