swift -> add system sound in custom keyboard, or add system sound elsewhere

 

 

The first step is to load AudioToolbox.framework

 



 

 

second step

import AudioToolbox

 

The third step is to add the sound where the sound needs to be played, such as the button sound 

AudioServicesPlaySystemSound(1104)

 

 

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326270338&siteId=291194637