I am displaying a modal view controller from an NSObject.
I call presentModalViewController:animated on self.sender which is another view controller. The view controller displays fine, but when I push a button in the view, I get the following error:
-[__NSCFType buttonCancelPressed:]: unrecognized selector sent to
instance
This is how I display the modal view controller from my NSObject:
FBComposeViewController *composeViewController = [[FBComposeViewController alloc] initWithNibName:@"FBComposeViewController" bundle:nil];
[self.sender presentModalViewController:composeViewController animated:YES];
The button is hooked up to a selector in FBComposeViewController using Interface Builder.
Does anyone have an idea why I might be getting this error?
The problem is probably the binding in FBComposeViewController.xib. What is the target-action for the cancel button set to?