A metaball loading written in Swift.
Special thanks to dodola's MetaballLoading, which is an android project. The animation is awesome! So I implement it in Swift, DBMetaballLoading's core algorithm is referenced by it's core algorithm.
let loadingView = DBMetaballLoadingView(frame: CGRect(x: 0, y: 100, width: 404, height: 50))
self.view.addSubview(loadingView)
- fillColor: UIColor
- strokeColor: UIColor
- ballRadius: CGFloat
- maxDistance: CGFloat
- curveAngle: CGFloat
- handleLenRate: CGFloat
- spacing: spacing
You can use CocoaPods to install DBMetaballLoading
by adding it to your Podfile
:
platform :ios, '8.0'
use_frameworks!
pod 'DBMetaballLoading'
- Download and drop
DBMetaballLoading/Source
folder in your project. - Congratulations!
- iOS8+
- Swift5.0
Please let me know if you like the library, or have any suggestions:]. I plan to maintain this library regularly. Any pull requests are welcome!
DBMetaballLoading is available under the MIT license. See the LICENSE file for more info.