Iphone6s has taptic engine or not, can I use a public API called UIFeedbackGenerator
to access it?
Introduction. Follow this guide to replace the Taptic Engine in your iPhone 6s. The Taptic Engine is the iPhone's vibrating and haptic feedback motor. If your phone isn't vibrating or produces a rattling sound when it does, replacing the Taptic Engine can remedy your issues.
Turn haptic feedback off or on On supported models, go to Settings > Sounds & Haptics. Turn System Haptics off or on.
Apple's Haptic Touch technology is similar to 3D Touch but it doesn't rely on pressure. Instead, Haptic Touch kicks in when a user long-presses the screen, offering a small vibration as acknowledgement following the press; haptic feedback, hence the Haptic Touch name.
Haptic feedback engine have been introduced in iPhone7/7+ and you can use it via UIFeedbackGenerator, here's an example:
let generator = UIImpactFeedbackGenerator(style: .heavy)
generator.prepare()
generator.impactOccurred()
As for iPhone 6S/6S I've found kind of fallback, please try it and describe the experience if you do have the device:
import AudioToolbox
AudioServicesPlaySystemSound(1519) // Actuate `Peek` feedback (weak boom)
AudioServicesPlaySystemSound(1520) // Actuate `Pop` feedback (strong boom)
AudioServicesPlaySystemSound(1521) // Actuate `Nope` feedback (series of three weak booms)
I've tried to summarize everything I found with regards to the Haptic feedback here: http://www.mikitamanko.com/blog/2017/01/29/haptic-feedback-with-uifeedbackgenerator/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With