I believe you have two problems here:
- Check the collision
- Find out where to verify the collision
Checking the collision
A CALayer
has a a model layer and a presentation layer. The presentation layer give you the visual information you need. Basically this layer is responsible to have the information about where the layer is on the screen. You can get it doing: circleView.layer.presentationLayer
Find out where to verify the collision
You can do this with a NSTimer
that runs every 1/60 seconds. However, this is not a good solution because the NSTimer
only guarantees the minimum time it will take to perform a selector. This way you can have cases where you are going to check your colision after the object already colided.
You can, however, use CADisplayLink. This way you will get a call before the layer is render in the screen.