ElasticSpringLoading is a sample simulated text spring effect . Inspired by 不烂漫的罪名
swift3.0,iOS 8.0+
let animateView = ElasticSpringLoading(frame: CGRect.init(x: 0, y: 100, width: view.bounds.size.width, height: 100))//You can display text
let attriString = NSMutableAttributedString(string: "Your Text")//Your text should not wrap,just support one line
animateView.attriString = attriString
self.view.addSubview(animateView)
You can change text at any time in main thread ,just do this :
animateView.attriString = newAttriString
Manually
- Download the latest code version
- Open your project in Xcode,drag the
ElasticSpringLoading
folder into your project. Make sure to select Copy items when asked if you extracted the code archive outside of your project. - Build your project
Contributors are more than welcome.Pull your request
If you have some suggestion or find my mistake, hope you point out
If you wish to contact me, email at: [email protected]
Blog : jianshu
ElasticSpringLoading is released under the MIT license. See LICENSE for details.