How to animate a human written stroke using Swift/iOS?

后端 未结 3 1945
忘了有多久
忘了有多久 2021-01-30 02:24

Objective

I am attempting to create an animated approximation of human writing, using a UIBezierPath generated from a glyph. I understand and I have rea

3条回答
  •  再見小時候
    2021-01-30 03:16

    A couple of concepts in the Apple CAShapeLayer (strokeStart and strokeEnd) really don't seem to operate as expected when animated.

    But surely animating the strokeEnd is exactly what you want to do. Use multiple CAShapeLayers over top of one another, each one representing one stroke of the pen to form the desired character shape.

    enter image description here

提交回复
热议问题