ios - Vibrate phone when void function called -
i've seen other answers on how phone vibrate, can't thing work. can me?
my steps:
- added audiotoolbox framework (audiotoolbox.framework) target in build phases.
#import audiotoolbox/audioservices.hviewcontroller.h- added
- (void)vibrateviewcontroller.h - added
- (void)vibrate { audioservicesplayalertsound(ksystemsoundid_vibrate); }viewcontroller.hunder@implementation - called
[self vibrate];inviewdidload.
what missing here?
i don't want use ibaction because isn't supposed vibrate off button being pushed.
hopefully can help, , not share links other stack overflow questions/answers guarantee checked. post code/info necessary.
thanks!!
i have phone on. not on silent. , iphone5. 
this should work. vibration disabled in iphone sound settings.
if using ipod touch, should aware device doesn't have vibration motor.
Comments
Post a Comment