Quantcast
Viewing latest article 1
Browse Latest Browse All 3

Answer by efremidze for Creating a haptic feedback pattern in swift 3

You can create an OperationQueue and add operations with haptic feedback. The operation would look like this:

class HapticFeedbackOperation: Operation {
    override func main() {
        // Play the haptic feedback
        UIImpactFeedbackGenerator(style: .heavy).impactOccurred()
    }
}

You might want to add a delay between the operations.

Checkout my open source framework Haptica, it supports both Haptic Feedback, AudioServices and unique vibrations patterns. Works on Swift 4.2, Xcode 10


Viewing latest article 1
Browse Latest Browse All 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>