在ios应用程序中没有声音振动

时间:2014-11-27 13:25:04

标签: ios iphone xamarin.ios xamarin

有没有什么方法可以在不播放声音的情况下振动iphone? 到目前为止,我只能使用声音振动。我试过跟随,但都发出声音振动

SystemSound.Vibrate.PlayAlertSound ();
SystemSound.Vibrate.PlaySystemSound();

请告知

2 个答案:

答案 0 :(得分:3)

来自monotouch-samples,这应该有效:

SystemSound.Vibrate.PlaySystemSound();

也许你改变了你的iPhone振动声音设置

答案 1 :(得分:0)

这应该有效:

#import <AudioToolbox/AudioToolbox.h> 

//Vibrate iphone 
AudioServicesPlaySystemSound (kSystemSoundID_Vibrate);