gpt4 book ai didi

iphone - 如何让 iPhone 振动?

转载 作者:搜寻专家 更新时间:2023-10-30 20:07:04 27 4
gpt4 key购买 nike

我正在使用此代码购买音频线的编译错误。有谁知道为什么吗?

- (void)handleTimer:(NSTimer *)timer 
{
self.counter--;
self.timerLabel.text = [NSString stringWithFormat:@"%ld", self.counter];
if (self.counter == 0)
{
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
}
}

最佳答案

你很可能忘记为它导入一个框架

#import <AudioToolbox/AudioToolbox.h>

关于iphone - 如何让 iPhone 振动?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6785322/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com