Swiftpack.co - emmanuelkehinde/RippleView as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by emmanuelkehinde.
emmanuelkehinde/RippleView 1.0.2
A simple Ripple animation view library in SwiftUI
⭐️ 2
🕓 2 years ago
iOS macOS
.package(url: "https://github.com/emmanuelkehinde/RippleView.git", from: "1.0.2")

RippleView

A simple Ripple animation view in SwiftUI.

solid outlined

<img style="max-width:100%;" src=https://raw.githubusercontent.com/emmanuelkehinde/RippleView/main/Media/solid.gif?raw=true width=400 align="center" />

<img style="max-width:100%;" src=https://raw.githubusercontent.com/emmanuelkehinde/RippleView/main/Media/outlined.gif?raw=true width=400 align="center" />

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: 2
Last commit: 2 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

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