Tracking progress of UIView animations?
I'm working on a game that is going to require knowing when one UIImageView and another intersect.
In a nutshell, the user is firing, let's say, bullets, while there is a timer used to launch targets onto the plane at random. When the "bullets" and the "targets" intersect, the "target" needs to explode.
To achieve this, I need to track the coordinates of each, but I'm finding that the CGPoint values for "center" aren't being updated as the animation progresses.
I could make a guesstimate on the progress based on the number of pixels being traveled with UIView, but that's really kind of a hack. Also, using the methods called when the animation is started and stopped doesn't really help me either.
I read elsewhere that only OpenGL will allow me to animate and track on a per-pixel basis. Does anyone know if this is the case, or can I somehow get by with the UIView animation functionality?
Thanks in advanced for any insight!
|