Search code examples
iosios6c4

Get all touches on screen


I'm having a small issue. I'd like to receive all touches on the screen and for each one spawn a new video. The problem is that once a video is placed then it intercepts the touch points. I tried various values to go in locationInView but without any luck so far. Am I looking in the right place?

 -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {

    CGPoint pointOnScreen = [[touches anyObject] locationInView:self.view];

    C4Movie *player = [C4Movie movieNamed:@"inception.mov"];
    player.shouldAutoplay = YES;
    player.loops = YES;
    player.center = pointOnScreen;
    [self.canvas addMovie:player];

 }
 @end

Solution

  • Try setting the userInteractionEnabled property of each video screen (assuming it is held in some sort of UIView) to NO - that way, touch events will pass through it and continue to be received by your handler.