0
我只是想在我的应用程序中听到键盘输入声音。在键盘快捷键中听不到输入声音
我加
UIDevice.currentDevice().playInputClick()
到我的应用程序代理,但我还没有听到键盘的声音。
我该如何启用它?
感谢
我只是想在我的应用程序中听到键盘输入声音。在键盘快捷键中听不到输入声音
我加
UIDevice.currentDevice().playInputClick()
到我的应用程序代理,但我还没有听到键盘的声音。
我该如何启用它?
感谢
试试这个AudioServicesPlaySystemSound(1104)
代替UIDevice.currentDevice().playInputClick()
。
其实我试过了,但它不起作用。我在updateSearchResultsForSearchController中使用它。这是错误的吗? –
你能提供一些代码吗? –
func updateSearchResultsForSearchController(searchController:UISearchController){ UIDevice.currentDevice()。playInputClick() } –