项目中添加震动效果(分分钟哦~)

来源:互联网 发布:js json长度 编辑:程序博客网 时间:2024/06/13 23:50

不多就说,就两步,声明、调用。

声明

#import<AudioToolbox/AudioToolbox.h>

#import<UIKit/UIKit.h>


调用--复制在需要震动的地方

AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);


就是这么简单~ 完成~

0 0