Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Apple souce

macrumors member
Original poster
Mar 15, 2012
60
16
Hey guys,

I'm trying to replicate the behaviour of the HUD in the Videos app (when watching a video). So to put it in words there is a custom view at the top of the screen which fades in and fades out after about 4 seconds. If you tap on the view or any of its subviews(UIButton, UISlider), the timer resets back to 0 and starts over.

I have everything working except for that timer which should reset when a subview is tapped.

Ive got a gesture recognizer on the custom view but the target-action method doesnt get called when I touch a subview.
 
Last edited:

MattInOz

macrumors 68030
Jan 19, 2006
2,760
0
Sydney
What is the stacking order of the view that has the gesture attached?

Check there isn't a view above that is stopping touches from being passed down the responder chain.
 

Apple souce

macrumors member
Original poster
Mar 15, 2012
60
16
What is the stacking order of the view that has the gesture attached?

Check there isn't a view above that is stopping touches from being passed down the responder chain.

Thanks for the replay, I got it working at first using spaghetti code in the delegate method - gestureRecognizer:shouldReceiveTouch: but then I did a bit of fiddling around and it turned out
Code:
customView.canclesTouchesInView = NO;
was what I was missing. After adding that, I no longer needed the delegate method.
Thanks
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.