三軸 (three axes could be positive or negative)
X軸 horizontal across
y軸 vertical across
z軸 runs through from front to back
Two primary classes
- UIAccelerometer
- UIAcceleration
3 steps
- Get the shared accelerometer object
- Config the delivery interval (default 100 times/second)
- Set the delegate
- object to receive acceleration events
- data is sent to the main thread repeatedly until removed.
How to utilize UIAcceleration
store the data associated with an acceleration event
read-only properties x, y, z
沒有留言:
張貼留言