开发者

Disable iPhone vibrate with Setting Bundle [iPhone SDK]

i build an app, now i want disable my shaking with setting bundle when iphone is shaking and vibrating

AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);

Setting Bundle :

Title: Vibrate //// Key : dis_vib//// Type :开发者_开发知识库 PSToggleSwitchSpecifier


Before you call the vibration code, check to see what the NSUserDefaults say.

For example:

if ([[NSUserDefaults standardUserDefaults] boolForKey:@"ShouldVibrate"]){
   //Vibrate code
}

Where "ShouldVibrate" is what the settings bundle is setting.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜