Hi
I've got a UIImageView that is meant to cycle through 5 images. I do this by calling a method every 0.2 seconds to update it with the new UIImage.
However, I get the flickering effect as shown in the video below. I'm not sure why this is happening, I did think it could be to do with the amount of work and memory required for floats, but since there is only 1 that is meing manipulated I don't think this is the problem.
Hmm, this won't let me embed the video. See it here: http://youtu.be/sLLfQLaXVwQ?hd=1
I basically call the method below and that is enough to keep the images cycling.
Any ideas as to the cause?
Thanks,
Sam
I've got a UIImageView that is meant to cycle through 5 images. I do this by calling a method every 0.2 seconds to update it with the new UIImage.
However, I get the flickering effect as shown in the video below. I'm not sure why this is happening, I did think it could be to do with the amount of work and memory required for floats, but since there is only 1 that is meing manipulated I don't think this is the problem.
Hmm, this won't let me embed the video. See it here: http://youtu.be/sLLfQLaXVwQ?hd=1
I basically call the method below and that is enough to keep the images cycling.
Code:
-(void)startCharacterCycle {
NSLog(@"Called start character cycle.");
[self performSelector:@selector(actuallyChangeYouCharacter:) withObject:state1ImageYou afterDelay:1*[nsNumberYouCharacterAnimationSpeed floatValue]];
[self performSelector:@selector(actuallyChangeYouCharacter:) withObject:state2ImageYou afterDelay:2*[nsNumberYouCharacterAnimationSpeed floatValue]];
[self performSelector:@selector(actuallyChangeYouCharacter:) withObject:state3ImageYou afterDelay:3*[nsNumberYouCharacterAnimationSpeed floatValue]];
[self performSelector:@selector(actuallyChangeYouCharacter:) withObject:state4ImageYou afterDelay:4*[nsNumberYouCharacterAnimationSpeed floatValue]];
[self performSelector:@selector(actuallyChangeYouCharacter:) withObject:state5ImageYou afterDelay:5*[nsNumberYouCharacterAnimationSpeed floatValue]];
[self performSelector:@selector(startCharacterCycle) withObject:nil afterDelay:6*[nsNumberYouCharacterAnimationSpeed floatValue]];
}
Thanks,
Sam