Hi All,
Im writing some code to animate an image moving up the display, just a simple
thing moving from the bottom to the top.
the image is 75x75, and Im displaying that in a CALayer sized to 45x45 by
setting its .contents property to the .CGImage of the UIImage.
on the newer phones this runs very smoothly, even if I have more than one of
those CALayers animating at once, but on an older (original) iPhone I am
testing on the animation is slightly rough/jerky even with only a single image
moving.
The iPhone is running 3.1.3 and I am performing the animation using this code:
CABasicAnimation* animation = [CABasicAnimation animation];
animation.keyPath = @"position.y";
CGFloat from=self.position.y;
CGFloat to=self.position.y-[self.calculator
distanceForAnimationStartingAt:from];
animation.fromValue = [NSNumber numberWithFloat:from];
animation.toValue = [NSNumber numberWithFloat:to];
CGFloat distance=to-from;
animation.duration = [self.calculator timeToTravelDistance:distance];
animation.repeatCount = 1;
animation.autoreverses = NO;
animation.timingFunction = [CAMediaTimingFunction functionWithName:
kCAMediaTimingFunctionEaseInEaseOut];
animation.removedOnCompletion = NO;
animation.fillMode = kCAFillModeForwards;
animation.delegate=self;
[self addAnimation:animation forKey:@"animateUp"];
so, obviously the older phone is basically just less capable, but is it likely
to be possible to smooth things out? are there any known tricks or things I
can do that might improve things on the older hardware?
Thanks for any help.
- Andrew Bush
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]