how to make iphone shake
2011-08-05 23:32
260 查看
1.Add the AudioToolbox framework to your target.
2. In the file you intend to trigger a vibration, import the AudioToolbox header file:
#import <AudioToolbox/AudioToolbox.h>
3. Finally, call the following line to make the device vibrate:
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
needed to change an iphone setting .
For sounds , had vibrate turned off.
change vibrate to ON under sounds
2. In the file you intend to trigger a vibration, import the AudioToolbox header file:
#import <AudioToolbox/AudioToolbox.h>
3. Finally, call the following line to make the device vibrate:
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
needed to change an iphone setting .
For sounds , had vibrate turned off.
change vibrate to ON under sounds
相关文章推荐
- Rotating Turrets: How To Make A Simple iPhone Game with Cocos2D Part 2
- Harder Monsters and More Levels: How To Make A Simple iPhone Game with Cocos2D Part 3
- How to Make an HTML5 iPhone App
- How to Make an HTML5 iPhone App
- How To Make A Simple iPhone Game with Cocos2D 3.0 Tutorial
- How To Make Successful iPhone App
- How To Make a Simple iPhone Game with Flash CS5
- raywenderlich—Harder Monsters and More Levels: How To Make A Simple iPhone Game with Cocos2D Part 3
- iphone游戏开发-Collisions and Collectables: How To Make a Tile Based Game with Cocos2D Part 2
- raywenderlich-Rotating Turrets: How To Make A Simple iPhone Game with Cocos2D Part 2
- How to make linux boot from network
- How to Configure iOS for iPhone and iPad to Use So
- Sparse Dictionaries (How to Make or Find them)
- How to Make an HTTP Connection Using TCP/IP with RSocket
- How to Make a AutoBuild System with Git Server
- How to uninstall Xcode and iPhone SDK
- iPhone How-to:图片的灰度处理
- How to make your app support Galaxy note
- How to Use C++ With PHP and JQuery to Make Neat Apps
- iphone app 开发:HOWTO build the toolchain for Iphone-dev