Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Programmer

macrumors member
Original poster
I set up a simple accelerometer test to try out the accelerometer but my application isn't works i declared a CGPoint and a UIImageVeiw in the .h file and set up the accelerometer to update:
HTML:
	[[UIAccelerometer sharedAccelerometer] setUpdateInterval:(1.0 / kAccelerometerFrequency)];
	[[UIAccelerometer sharedAccelerometer] setDelegate:self];
and then told the CGPoint x and y axes's to update to the accelerometer axes's and then told the UIImageVeiw to say in the center of the CGPoint:
HTML:
- (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration {
	// Update the accelerometer graph view
	deviceTilt.x = acceleration.x;
	deviceTilt.y = acceleration.y;
    Circle.center = deviceTilt;
}
but when I run it on my iPhone The circle (the UIImageVeiw) just stays in the center. Please Help
 
By the way

By the way what happens is the circle stays in the top Left corner no matter what angle the device is at
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.