在需要的类中导入
#import <AudioToolbox/AudioToolbox.h>
然后添加下面一句代码就可以了
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
在需要的类中导入
#import <AudioToolbox/AudioToolbox.h>
然后添加下面一句代码就可以了
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
转载于:https://www.cnblogs.com/qq9070/p/4723224.html