Unable to forward UITouch events to my view controller
Posted
by hyn
on Stack Overflow
See other posts from Stack Overflow
or by hyn
Published on 2010-05-06T16:05:06Z
Indexed on
2010/05/06
16:08 UTC
Read the original article
Hit count: 373
I have a UISplitViewController setup with a custom view added as a subview of the view (UILayoutContainerView) of split view controller. I am trying to forward touch events from my custom view controller to the master and detail views, but the following (which was suggested here on another thread) seems to have no effect:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{ UITouch *touch = [touches anyObject]; // Do something
[self.nextResponder touchesBegan:touches withEvent:event];
}
(I couldn't get this formatted properly)
As a result my custom view controller locks the events and all the UI underneath never has a chance to do anything.
How can I get my master and detail view controllers to receive events?
© Stack Overflow or respective owner