Imagine three instances of a CCLayer
subclass Block
positioned next to each other. Each is 100x100 pixels and has some basic square background art. These three objects are part of an encapsulating CCLayer
subclass called Container
.
How can I swipe across the three Blocks and detect the swipe/tap/touch for each Block in Container?
If the problem was constrained to just handling taps on Block
s in Container
then one could use a delegate. Something like BlockDelegate
with a required method userTappedBlock:(Block *) b
which would inform the Container
whenever a Block
is tapped.
However this approach hasn't worked for swiping yet. I get the callback in Container
but only for the first Block
that's tapped.