Swiftpack.co -  emmanuelkehinde/RippleView as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
emmanuelkehinde/RippleView
A simple Ripple animation view library in SwiftUI
.package(url: "https://github.com/emmanuelkehinde/RippleView.git", from: "1.0.2")

RippleView

A simple Ripple animation view in SwiftUI.

solid outlined

Installation

Here is how to integrate the library into your iOS project.

Swift Package Manager

  • File > Swift Packages > Add Package Dependency
  • Add https://github.com/emmanuelkehinde/RippleView.git
  • Select "Up to Next Major Version" with "1.0.2"

Basic Usage

Place the RippleView anywhere you want it to appear in your SwiftUI View.

ZStack {
   RippleView()
}

You also have access to some customization options.

@State private var rippleShouldAnimate: Bool = true

ZStack {
  RippleView(
      style: .solid,
      rippleCount: 7,
      tintColor: Color.blue,
      timeIntervalBetweenRipples: 0.18,
      shouldAnimate: $rippleShouldAnimate
  )
}

Available parameters include:

  • style: The ripple style, either solid or outlined, defaults to solid
  • rippleCount: The number of ripples to display, defaults to 5
  • tintColor: The color to tint the ripples with, defaults to black
  • timeIntervalBetweenRipples: The expected time interval between each ripple display, defaults to 0.13
  • shouldAnimate: A binding that tells if animation should begin or not, defaults to true

Blog Post

https://emmanuelkehinde.io/swiftui-building-a-reusable-ripple-animation-view-swift-package/

Enjoy 🚀

GitHub

link
Stars: 0
Last commit: 3 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API