We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
//三角形两边的比例 let scale = (lineLength - 2*margin)/(lineLength - lineWidth) for i in 0...3 { var keypath = "transform.translation.y" if i%2 == 1 { keypath = "transform.translation.x" } let lineAnimationTwo = CABasicAnimation.init(keyPath: keypath) lineAnimationTwo.beginTime = CACurrentMediaTime() + duration/2 lineAnimationTwo.duration = duration/4 lineAnimationTwo.fillMode = kCAFillModeForwards lineAnimationTwo.isRemovedOnCompletion = false lineAnimationTwo.autoreverses = true lineAnimationTwo.fromValue = 0 if i == 0 || i == 3 { lineAnimationTwo.toValue = lineLength/4 * scale }else { lineAnimationTwo.toValue = -lineLength/4 * scale } let lineLayer = lines[i] lineLayer.add(lineAnimationTwo, forKey: "lineAnimationThree") }
这段代码中 三角形两边比例指的是哪个三角形,没看太懂,能简单解释一下这个 scale的含义吗?
还有这个 lineLength/4 是从那里来的?
lineLength/4
lineAnimationTwo.toValue = lineLength/4 * scale
The text was updated successfully, but these errors were encountered:
No branches or pull requests
这段代码中 三角形两边比例指的是哪个三角形,没看太懂,能简单解释一下这个 scale的含义吗?
还有这个
lineLength/4
是从那里来的?lineAnimationTwo.toValue = lineLength/4 * scale
The text was updated successfully, but these errors were encountered: