Skip to content

Version 1.0.2

Compare
Choose a tag to compare
@SvenTiigi SvenTiigi released this 02 Jun 10:45
· 472 commits to main since this release

HapticFeedback

You can enable on both DetailButton and CompletionButton haptic feedback when the user pressed one of these buttons. Either by setting the property or passing it to the initializer.

// Impact Feedback
button.hapticFeedback = .impact

// Selection Feedback
button.hapticFeedback = .selection

// Notification Feedback with type
let completionButton = WhatsNewViewController.CompletionButton(
    title: "Continue", 
    action: .dismiss,
    hapticFeedback: .notification(.success)
)

☝️ In default the HapticFeedback is nil indicating no haptic feedback should be executed.