fish-red / Haptica

Easy Haptic Feedback Generator 📳

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Haptica

Language Version License Platform Carthage compatible

Haptica is an easy haptic feedback generator.

$ pod try Haptica

Requirements

  • iOS 10.0+
  • Xcode 8.0+
  • Swift 3.0+

Haptic Feedback Requirements:

  • A device with a supported Taptic Engine (iPhone 7 and iPhone 7 Plus).
  • App is running in the foreground.
  • System Haptics setting is enabled.

Usage

Generate using a haptic feedback type.

Haptic.impact(.light).generate()

Feedback Types

UIButton Extension

Use Haptica with UIButtons by setting isHaptic to true and setting the haptic feedback type (hapticType) to the desired type (.impact(.light)).

button.isHaptic = true
button.hapticType = .impact(.light)

Properties

var isHaptic: Bool // enables haptic feedback
var hapticType: Haptic? // haptic feedback type
var hapticControlEvents: UIControlEvents? // haptic feedback control events

Installation

CocoaPods

To install with CocoaPods, simply add this in your Podfile:

use_frameworks!
pod "Haptica"

Carthage

To install with Carthage, simply add this in your Cartfile:

github "efremidze/Haptica"

Communication

  • If you found a bug, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, submit a pull request.

License

Haptica is available under the MIT license. See the LICENSE file for more info.

About

Easy Haptic Feedback Generator 📳

License:MIT License


Languages

Language:Swift 80.3%Language:Ruby 12.1%Language:Objective-C 7.6%