After countless tries I got my animation animating right (Why oh why is the layer's coordinate system Y flipped from the view's coordinate system, I will never guess) but it seems that it degrades the image quality for some reason:
(green circled are examples of the original good quality images, the red circled is to emphasize the difference. original image.).
(The lower images are as supposed to be, except the left one. The rest are pixelated.)
The code I'm using (approximately, you can see the exact one in the image.):
CGImageRef *ir = [UIImage imageNamed:@"something"].CGImage; CALayer *cl = [CALayer layer]; cl.contents = ir; CABasicAnimation *anim = [CABasicAnimation animationWithKeyPath:@"transform.translation.x"]; anim.duration = 5; anim.autoreverses = NO; anim.removedOnCompletion = NO; anim.fromValue = **something** anim.toValue = **anotherthing** [cl addAnimation:anim forKey: @"fallDown"];
Why is there such a difference between the images? How do I fix it?
How is my code? I just can't find enough examples / explanations about the animation types and all stuff you can do with it (for example all of the animatable properties). And I am learning the SDK by myself (I have iPhone in Action but it's quite basic) and there is no one I know to review my code :)
[iPhone SDK] [Newbie] UITextView textViewDidChange will not be called?