Swiftpack.co - benlmyers/quick-haptic as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by benlmyers.
benlmyers/quick-haptic 1.2.3
A quick and easy way to use haptic feedback in your UIKit or SwiftUI iOS apps.
⭐️ 1
🕓 40 weeks ago
iOS macOS
.package(url: "https://github.com/benlmyers/quick-haptic.git", from: "1.2.3")

QuickHaptic

Quickly create haptic feedback using this module.

Installation

Use Swift Package Manager to install this package:

https://github.com/benlmyers/quick-haptic

Usage

In your View or ViewController, first import QuickHaptic:

import QuickHaptic

Play a single light haptic:

Haptic.play(.light)

Play two soft haptics rapidly in succession:

Haptic.double(.soft)

Play a heavy haptic, then a medium haptic:

Haptic.double(.heavy, .medium)

Haptic Styles

QuickHaptic supports every type of FeedbackStyle offered.

Available Styles:

  • heavy
  • light
  • medium
  • rigid
  • soft

GitHub

link
Stars: 1
Last commit: 4 days ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

1.2.3
40 weeks ago

This patch automatically enables haptic feedback on a fresh install.

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