0
我只是想在我的應用程序中聽到鍵盤輸入聲音。在鍵盤快捷鍵中聽不到輸入聲音
我加
UIDevice.currentDevice().playInputClick()
到我的應用程序代理,但我還沒有聽到鍵盤的聲音。
我該如何啓用它?
感謝
我只是想在我的應用程序中聽到鍵盤輸入聲音。在鍵盤快捷鍵中聽不到輸入聲音
我加
UIDevice.currentDevice().playInputClick()
到我的應用程序代理,但我還沒有聽到鍵盤的聲音。
我該如何啓用它?
感謝
試試這個AudioServicesPlaySystemSound(1104)
代替UIDevice.currentDevice().playInputClick()
。
其實我試過了,但它不起作用。我在updateSearchResultsForSearchController中使用它。這是錯誤的嗎? –
你能提供一些代碼嗎? –
func updateSearchResultsForSearchController(searchController:UISearchController){ UIDevice.currentDevice()。playInputClick() } –