手机震动 私有api

void AudioServicesStopSystemSound(int);

void AudioServicesPlaySystemSoundWithVibration(int, id, NSDictionary *);
            NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
            NSArray *pattern = @[@YES, @1000, @NO, @1];
            dictionary[@"VibePattern"] = pattern;
            dictionary[@"Intensity"] = [[NSNumber alloc] initWithFloat:progress];
            AudioServicesStopSystemSound(kSystemSoundID_Vibrate);
            AudioServicesPlaySystemSoundWithVibration(kSystemSoundID_Vibrate, nil, dictionary);

你可能感兴趣的:(手机震动 私有api)