I am having problems with int increments from one function by calling it in another function.
At the moment, the bit I'm working on is as follows:
in the .h file, I declare int and timer as follows:
int count;
NSTimer *sequenceOn;
in the .m file, my function segment looks like this:
-(void) sequence {
count = 1;
while (count < (target)) {
sequenceOn = [NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(imagePlayer) userInfo:nil repeats:NO];
}
}
-(void)imagePlayer {
--CODE HERE FOR PLAYING ANIMATION--
count = count + 1;
}
All of my other code is working fine, and it should play a series of images using the count value to decide which one to play. At the moment, although it only plays the first animation, it will not increase until the next.
Any help would be greatly appreciated.
Thank.
source
share