Skip to content

Commit

Permalink
Fix button on devices without Haptic Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
BalestraPatrick committed Sep 16, 2017
1 parent 8297501 commit 6bd323d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions HapticButton/Classes/HapticButton.swift
Expand Up @@ -141,6 +141,8 @@ open class HapticButton: UIControl {
super.touchesBegan(touches, with: event)
if traitCollection.forceTouchCapability == .available {
generator.prepare()
} else {
completionBlock()
}
}

Expand Down

0 comments on commit 6bd323d

Please sign in to comment.