1

I'm really getting crazy on this, so I'd ask for some help.

I'm coding a little widget that presents two UIButton the user can tap, once pressed the widget adds a notification to the app, if the button is pressed again the notification will be deleted.

Initially I added a sound to the touch of the button and worked ok with AVPlayer, then I decided to use the haptic engine to give feedback to the user so I deleted the AVPlayer call to stop the sound: guess what? the button continues to play the sound! I've commented the code I used to play the sound, how can it still play the sound?.

The strange thing is that one button has got this strange behaviour, while the other just works fine (only haptic engine), it sounds like a bug but I'm a rookie and it should be my fault somewhere.

Any idea?

FelixSFD
  • 6,052
  • 10
  • 43
  • 117
Fabrizio
  • 514
  • 7
  • 18

0 Answers0