【问题标题】:issue while vibrating iPhone ios sdk振动iPhone ios sdk时出现问题
【发布时间】:2015-06-01 05:45:01
【问题描述】:

我想同时vibrateflash light。但是当我使用以下代码时,我只得到flash light

if (some condition)
{
    AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
    [self setTorch:YES];
}

但是当我只使用时

AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);

我的手机震动了。

我找不到问题。

【问题讨论】:

    标签: ios objective-c iphone xcode vibration


    【解决方案1】:

    May be it will useful for you

    找到这个Gonna Vibrate the device to alert the user? Read this first

    这两个功能都会震动 iPhone。但是当您在不支持振动的设备上使用第一个功能时,它会发出哔哔声。另一方面,第二个功能在不受支持的设备上没有任何作用。因此,如果您要连续振动设备,就像常识所说的警报一样,请使用功能 2。

    AudioServicesPlayAlertSound(kSystemSoundID_Vibrate);
    AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-11-14
      • 2016-04-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-09
      • 2021-05-05
      相关资源
      最近更新 更多