项目介绍:
https://github.com/IvanVorobei/TwitterLaunchAnimation
About
Project with launch animation of Twitter. On GitHub many projects, but this is very similar to the original animation
Twitter的启动动画。 在GitHub上有很多项目,但这个点动画相似度很高
How use
Add some lines code in AppDelegate file:
let twitterLogoBezierPath = SPBezierPathFigure.logoTwitter()
SPLaunchAnimation.asTwitter(icon: twitterLogoBezierPath, onWindow: self.window!)
or
let twitterLogoImage = UIImage.init(named: "twitter-logo")!
SPLaunchAnimation.asTwitter(icon: twitterLogoImage, onWindow: self.window!)
You must pass the current window as a parameter to a function
Problems and advice
Logo located above the center axis and rootView resizes the end of the animation. So we had to do a lot of calculations. You can see it with your code.
Logo should vector. In animations used a large scale and problems of bitmap images – loss of quality with scale. I recomended use BezierPath, but if this is not possible – UIImage in pdf
标志位于中心轴上方,rootView调整动画结束的大小。 所以我们不得不做很多计算。 你可以看到它与你的代码。
标志应该向量。 在动画中使用了大规模和位图图像的问题 – 质量损失与规模。 我推荐使用BezierPath,但如果这是不可能的 – UIImage的pdf
Contact:
http://hello.ivanvorobei.by
http://ivanvorobei.by
hello@ivanvorobei.by