code_junkie

Method for animating images (like a movie) on iPhone without using MPMoviePlayer

Nov 13th, 2011
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. [CATransaction begin];
  2. [CATransaction setValue:[NSNumber numberWithFloat:0.25f] // 1/4th of a second per frame
  3. forKey:kCATransactionAnimationDuration];
  4. [mainLayer replaceSublayer:[imageLayers objectAtIndex:oldImageIndex] with:[imageLayers objectAtIndex:newImageIndex]];
  5. [CATransaction commit];
Add Comment
Please, Sign In to add comment