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