Thank You for the reply Mark.
This is a custom Cell View. The original tableview's contentView get swiped to reveal another view which contains 4 buttons which perform various actions.
In another viewController, I did the following to push the same viewController in question
Code:
- (void)showContent{
UIViewController *nextViewController = nil;
nextViewController = [[ContentViewController alloc] initWithStyle:UITableViewStyleGrouped];
((ContentViewController *)nextViewController).content = content;
if (nextViewController) {
[self.navigationController pushViewController:nextViewController animated:YES];
}
[nextViewController release];
}
However, from the cell's subview, I can not target that viewController too
when I try:
[self.superview.navigationController pushViewController:nextViewController animated:YES];
It will not work as the superview is a tableview subclass and the actual navigationController is one level above this in the hierarchy
I really am lost how to do this.
Thanks,
Afzal Khan
Quote:
Originally Posted by bytor99999
So it is assumed that you have created a custom UITableViewCell and in it added a button. All you need to do is connect the button to an Action, just like any other button. It is just the code will not be in the TableViewController but in the UITableViewCell instead.
If this isn't a custom cell view and you fulfill the Apple UI Guidelines, then you can use the DetailedDisclosure button as the accessoryType. Then you just override the accessoryButtonTappedForRowWithIndexPath:indexPath method.
Hope that helps.
Mark
|