¡@

Home 

2014/10/15 ¤U¤È 10:13:45

iphone Programming Glossary: self.angle

How can I rotate an image in response to the iPhone's accelerometer?

http://stackoverflow.com/questions/954711/how-can-i-rotate-an-image-in-response-to-the-iphones-accelerometer

1.0 0.1 rollingY acceleration.y 0.1 rollingY 1.0 0.1 float xx rollingX float yy rollingY float angle atan2 yy xx self.angle M_PI 2.0 if self.angle 2.25 self.angle 0.25 if deviceOrientation UIInterfaceOrientationPortrait deviceOrientation UIInterfaceOrientationPortrait.. acceleration.y 0.1 rollingY 1.0 0.1 float xx rollingX float yy rollingY float angle atan2 yy xx self.angle M_PI 2.0 if self.angle 2.25 self.angle 0.25 if deviceOrientation UIInterfaceOrientationPortrait deviceOrientation UIInterfaceOrientationPortrait.. rollingY 1.0 0.1 float xx rollingX float yy rollingY float angle atan2 yy xx self.angle M_PI 2.0 if self.angle 2.25 self.angle 0.25 if deviceOrientation UIInterfaceOrientationPortrait deviceOrientation UIInterfaceOrientationPortrait self.updatingIsEnabled..