I have a subview that when double tapped a protocol method on the subview's parent view controller is called like this...
Here is the protocol method with the dictionary consuming code removed.
The protocol method is called and runs without any errors but the modal view does not present itself.
I temporarily copied the protocol method's code to an IBAction method for one of the parent's view button's to isolate it from the subview. When I tap this button the modal view works fine.
Can anyone tell me what I am doing wrong? Why does it work when executed from a button on the parent view, and not from a protocol method called from a subview.
Thanks,
John
Code:
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *theTouch = [touches anyObject];
if (theTouch.tapCount == 1) {
} else if (theTouch.tapCount == 2) {
if ([self.delegate respondsToSelector:@selector(editEvent:)]) {
[self.delegate editEvent:dictionary];
}
}
}
Here is the protocol method with the dictionary consuming code removed.
Code:
- (void)editEvent:(NSDictionary){
EventEditViewController *eventEditViewController = [[EventEditViewController alloc] initWithNibName:@"EventEditViewController" bundle:nil];
eventEditViewController.delegate = self;
navigationController = [[UINavigationController alloc] initWithRootViewController:eventEditViewController];
[self presentModalViewController:navigationController animated:YES];
[eventEditViewController release];
}
The protocol method is called and runs without any errors but the modal view does not present itself.
I temporarily copied the protocol method's code to an IBAction method for one of the parent's view button's to isolate it from the subview. When I tap this button the modal view works fine.
Can anyone tell me what I am doing wrong? Why does it work when executed from a button on the parent view, and not from a protocol method called from a subview.
Thanks,
John