I have a UIViewController implementation which builds a core image cube and rotates it while there are touches events occuring. It has the following methods:
initController
touchesBegan
touchesMoved
touchesEnded
continueSpinning
I am trying to continue rotating the cube after the touchesEnded
fires for an amount of time (say 2 seconds). I have created the continueSpinning
method but I am unsure how to get the method to invoke without the touches methods e.g. on a timer.
I have tried calling continueSpinning
from touchesEnded
and sleeping the thread and recursively calling continueSpinning
but this just animates when the thread returns (after the 2 seconds).
I need some way of invoking 'continueSpinning' similar to the touchesBegin methods.
Any ideas?