I have a custom UITableViewCell which is part of a navigation controller. The cell has a button and when that button is pressed I want to push a view onto my navigation controller.
I can do this pretty easily by using a selector in my cellForRowAtIndexPath method.
[cell.fooButton addTarget:self action:@selector(pushBarViewController:) forControlEvents:UIControlEventTouchUpInside];
And then inside of the pushBarViewController method I can perform the push operation
[self.navigationController pushViewController:barViewController animated:YES];
This works pretty well, but now I need to pass in some information contained in my custom UITableViewCell into my barViewController. My action:@selector will not allow me to pass in any arguments so I can't use this method.
I've created an action on the button press inside the custom UITableViewCell but I can't push the view from in here as there is no navigation controller.
Can anyone help?