Commits

Anders Lehmann  committed 6ce6d05

move things around

  • Participants
  • Parent commits 518e213

Comments (0)

Files changed (1)

File Eruler/Classes/ErulerViewController.m

 		UIView *viewToMove=[self.view viewWithTag:i];
 
 		CGRect viewFrame=viewToMove.frame;
-		//int i=templengthX*50;
 		viewFrame.origin.y-= templengthX*50;
 		viewToMove.frame=viewFrame;
 		//		[self moveSubview:viewToMove];
 	[UIView commitAnimations];
 }
 
--(IBAction)startMeas{
-	[[UIAccelerometer sharedAccelerometer] setUpdateInterval:1.0 / 100.0];
-	[[UIAccelerometer sharedAccelerometer] setDelegate:self];
-	[self createAddMoveSubview];
-}	
--(IBAction)endMeas{
-	[self moveFrameBack];
-}
 -(void) calcConstants:(double)acceleration{
 	templengthX=-1/2*acceleration*0.01*0.01*9.82*100;
 	v0=acceleration*10;
 	[newView release];
 	[self moveFrames];
 }
+
+
+-(IBAction)startMeas{
+	[[UIAccelerometer sharedAccelerometer] setUpdateInterval:1.0 / 100.0];
+	[[UIAccelerometer sharedAccelerometer] setDelegate:self];
+	[self createAddMoveSubview];
+}	
+-(IBAction)endMeas{
+	[self moveFrameBack];
+}
+
 - (void)accelerometer:(UIAccelerometer *)acel didAccelerate:(UIAcceleration *)aceler {
 	[self calcConstants:aceler.z];
 	[self createAddMoveSubview];