Convenience method to play sound on buttons events
| Originator: | jacopo | ||
| Number: | rdar://15549353 | Date Originated: | 26-Nov-2013 09:52 AM |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | iOS 7.0 |
| Classification: | Feature (New) | Reproducible: | Not Applicable |
Summary: For many Apps a nice feature is to implement some kind of "click" sound when an user tap on a UIButton or some UIView subclasses with an UITapGestureRecognizer attached to them, like game menus implemented with UIKit or some sort of quiz App with audio feedback when an user select a wrong/correct answer. At today there are many ways to implement a sound but the one with AVPlayer is somewhat overkill and the one based on the systems sounds methods has some weird comportment (like put the App volume to zero but not mute the device and the system sound continues to play). Steps to Reproduce: Expected Results: A nice addition to the API (even for OS X SDK) is a method like setSoundWithName:forControlEvents: for UIControl subclasses and a setSoundWithName: for UIGestureRecognizer subclasses that are based on the App volume and super-duper optimized for the scope. (If it help limit the dimension/duration of the file, in the majority of the cases the sounds are never longer than 1/2 sec.)
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!