DBMetaballLoading
  • September 25, 2023

Synopsis


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.

Preview


Usage Example


let loadingView = DBMetaballLoadingView(frame: CGRect(x: 0, y: 100, width: 404, height: 50))
self.view.addSubview(loadingView)

Customizations


  • fillColor: UIColor
  • strokeColor: UIColor
  • ballRadius: CGFloat
  • maxDistance: CGFloat
  • curveAngle: CGFloat
  • handleLenRate: CGFloat
  • spacing: spacing

Installation


CocoaPods

You can use CocoaPods to install DBMetaballLoading by adding it to your Podfile:

platform :ios, ‘8.0’
use_frameworks!
pod ‘DBMetaballLoading’

Manually
  1. Download and drop DBMetaballLoading/Sourcefolder in your project.
  2. Congratulations!

Requirements


  • iOS8+
  • Swift3.0

GitHub


View Github

#ios #loadinganimations #swift #uicomponents
YOU MIGHT ALSO LIKE...
Swipeable cards

Swipeable Cards with SwiftUI

RGStack

This UI attempts to capture the Quibi Card Stack and the associated User Interaction.

🃏 CardStack

A easy-to-use SwiftUI view for Tinder like cards on iOS, macOS & watchOS.

SlideOverCard

A SwiftUI card design similar to the one used by Apple in HomeKit, AirPods, Apple Card and AirTag setup, NFC ...

DeckKit

DeckKit is a SwiftUI library that makes it easy to create deck-based apps. It has a DeckView that can render any list ...