UIAccelerometer Class Reference
Posted 2009/09/12 01:06, Filed under: 분류없음You do not create accelerometer objects directly. Instead, you use the shared UIAccelerometer object to specify the interval at which you want to receive events and then set its delegate property. Upon assigning your delegate object, the accelerometer object begins delivering acceleration events to your delegate immediately at the specified interval. Events are always delivered on the main thread of your application.
...
Your delegate is responsible for filtering out any unwanted updates and for ensuring that the amount of change is significant enough to warrant taking action.
http://developer.apple.com/iPhone/library/documentation/UIKit/Reference/UIAccelerometer_Class/Reference/UIAccelerometer.html#//apple_ref/occ/instp/UIAccelerometer/delegate
...
Your delegate is responsible for filtering out any unwanted updates and for ensuring that the amount of change is significant enough to warrant taking action.
http://developer.apple.com/iPhone/library/documentation/UIKit/Reference/UIAccelerometer_Class/Reference/UIAccelerometer.html#//apple_ref/occ/instp/UIAccelerometer/delegate
UIAccelerometer *accelerometer;
...
accelerometer = [UIAccelerometer sharedAccelerometer];
accelerometer.updateInterval = .01;
accelerometer.delegate = self;
Response :
0 Trackback
,
0 Comment
Trackback URL : http://8.7lightyears.com/blog/words/trackback/140







