Hey There! :]
As it’s mentioned suggested the book, I’m trying to practice
If you’re going to create more complex path animations and want to stay sane, you’d do well to keep in mind the note about rotationMode earlier in this chapter.
It works more or less ok, except for that the rotation is flickering on the animation start:
Here’s what I’m doing in the code:
I wonder, how do I get this flicker fixed?
@bpashch Thanks very much for your question!
Out of curiousity, have you tried running this on a device? Do you get the same result?
At first glance, my suggestion would be to change your:
airplaneOrientationAnimation.toValue = 2.0 * .pi to
airplaneOrientationAnimation.toValue = .pi
My guess is that some of your values might be a little off, and to perhaps experiment with different values.
I apologize, but this is simply at first glance. Another suggestion would be to place breakpoints in your code to see which part of the code is executing when the flicker occurs. This should help you identify the source of your problem
I hope this helps!
All the best!
The code is basically
final project from the book with the changes described above.
2 * .pi angle also comes from the book
Anyways, it’s been 8 months from that question now, I did not expect anyone to comment on this thread so far.
If you’re interested in this topic, please just feel free to get
15-stroke-and-path-animations project and try it for yourself.