Re: CAKeyframeAnimation for 'position' not working
Re: CAKeyframeAnimation for 'position' not working
- Subject: Re: CAKeyframeAnimation for 'position' not working
- From: David Duncan <email@hidden>
- Date: Thu, 1 Oct 2009 15:05:04 -0700
On Oct 1, 2009, at 2:45 PM, Christopher J Kemsley wrote:
The output, from the print statements, to show that it has VALID
values, is:
2009-10-01 13:11:00.887 Whose Line[56132:207] <CAKeyframeAnimation:
0x3921510>
2009-10-01 13:11:00.888 Whose Line[56132:207] --> 11, 11
2009-10-01 13:11:00.888 Whose Line[56132:207] --> (
0.178501,
0.4809336,
0.5841551,
0.8514135,
0.9723865,
1.163051,
1.258054,
1.540105,
1.850756,
1.916502,
2
)
The timings look right - the duration was set to 2 seconds... So
they're all in order and randomly spaced.
I'm not certain if anything was printed to the console, but these
timings are incorrect. From the documentation on CAKeyFrameAnimation:
"Each value in the array is a floating point number between 0.0 and
1.0 and corresponds to one element in the values array. Each element
in the keyTimes array defines the duration of the corresponding
keyframe value as a fraction of the total duration of the animation.
Each element value must be greater than, or equal to, the previous
value.
• If the calculationMode is set to kCAAnimationLinear, the first
value in the array must be 0.0 and the last value must be 1.0. Values
are interpolated between the specified keytimes."
So your values are ascending, but they are not normalized to 0-1, and
for linear the first value is not 0.0.
--
David Duncan
Apple DTS Animation and Printing
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden