Closed kutakmir closed 1 year ago
Hi, are you planning to support SwiftUI apps?
Temporary solution:
extension NSNotification.Name { public static let deviceDidShakeNotification = NSNotification.Name("MyDeviceDidShakeNotification") } extension UIWindow { open override func motionEnded(_ motion: UIEvent.EventSubtype, with event: UIEvent?) { super.motionEnded(motion, with: event) NotificationCenter.default.post(name: .deviceDidShakeNotification, object: event) } }
Source: https://stackoverflow.com/questions/58549151/how-to-detect-shake-gesture-in-swiftui
and
.onReceive(NotificationCenter.default.publisher(for: .deviceDidShakeNotification)) { _ in Shake.show() }
Hi @kutakmir ,
Thanks for the report. Yes, we are planning to support SwiftUI, guess this went under the radar. Adding this issue to backlog so expect it fixed in one of the upcoming releases.
David,
Shake Team
Hi, are you planning to support SwiftUI apps?
Temporary solution:
Source: https://stackoverflow.com/questions/58549151/how-to-detect-shake-gesture-in-swiftui
and