I have a custom table view controller called pfTableViewController
and a custom cell called customTableViewCell
.
From inside my customTableViewCell
I try to access an NSMutableArray
of the pfTableViewController
:
- (IBAction)changeEditing:(UITextField *)sender {
pfTableViewController *pfWin = (pfTableViewController *) self.superview.superview;
[pfWin.pfFields replaceObjectAtIndex: myId withObject: @"some text"];
}
I used superview twice because the first one calls the UITableView
and the second is supposed to call the pfTableViewController
but it doesn't happen, I get this error:
2013-04-17 09:48:38.017 webgopher[21757:907] -[UIViewControllerWrapperView pfFields]: unrecognized selector sent to instance 0x1d590d90
Any idea what's happening here?
If I use one more superview, it accesses the UINavigationTransitionView
, that's too far I think!