views:

191

answers:

0

in my app the accelerometer lags. a lot. i think it might be to do with the fact that all of my code is running through my main . h file which is also the accelerometer delegate like this:

@interface MainView : UIView <UIAccelerometerDelegate> {
 IBOutlet UISlider *sensitivity;
 float valueX;
 CGPoint pos;
 NSTimer *maintimer;
 NSTimer *speedTimer;
 UIAccelerometer *accelManeger;
 NSInteger animationFrameInterval;
 int playPin;
 int playY;
//Blah, blah blah....

if this is rite could anyone recommend a tutorial on 'creating new .h & m files?' or explain it here and what i would need to do to put my accelerometer in a separate file and then connect it to the object i am moving.

Thanks! Harry.