cocoaTouch/OverlayViewController.m
changeset 3356 3ae3fccb439e
parent 3347 5d0ac8197eb7
child 3357 3836a31879e7
equal deleted inserted replaced
3355:dc9e61e67484 3356:3ae3fccb439e
   310 			CGFloat deltaY = fabsf(gestureStartPoint.y - currentPosition.y);
   310 			CGFloat deltaY = fabsf(gestureStartPoint.y - currentPosition.y);
   311 			
   311 			
   312             if (deltaX >= minimumGestureLength) {
   312             if (deltaX >= minimumGestureLength) {
   313                 NSLog(@"Horizontal swipe detected, deltaX: %f deltaY: %f",deltaX, deltaY);
   313                 NSLog(@"Horizontal swipe detected, deltaX: %f deltaY: %f",deltaX, deltaY);
   314                 if (currentPosition.x > gestureStartPoint.x ) {
   314                 if (currentPosition.x > gestureStartPoint.x ) {
   315                     NSLog(@"Right movement");
   315                     HW_cursorLeft(logCoeff*log(deltaX));
       
   316                 } else {
   316                     HW_cursorRight(logCoeff*log(deltaX));
   317                     HW_cursorRight(logCoeff*log(deltaX));
   317                 } else {
       
   318                     NSLog(@"Left movement");
       
   319                     HW_cursorLeft(logCoeff*log(deltaX));
       
   320                 }
   318                 }
   321 
   319 
   322             } 
   320             } 
   323             if (deltaY >= minimumGestureLength) {
   321             if (deltaY >= minimumGestureLength) {
   324                 NSLog(@"Horizontal swipe detected, deltaX: %f deltaY: %f",deltaX, deltaY);
   322                 NSLog(@"Horizontal swipe detected, deltaX: %f deltaY: %f",deltaX, deltaY);
   325                 if (currentPosition.y < gestureStartPoint.y ) {
   323                 if (currentPosition.y < gestureStartPoint.y ) {
   326                     NSLog(@"Up movement");
   324                     HW_cursorDown(logCoeff*log(deltaY));
       
   325                 } else {
   327                     HW_cursorUp(logCoeff*log(deltaY));
   326                     HW_cursorUp(logCoeff*log(deltaY));
   328                 } else {
       
   329                     HW_cursorDown(logCoeff*log(deltaY));
       
   330                     NSLog(@"Down movement");
       
   331                 }            
   327                 }            
   332             }
   328             }
   333 
   329 
   334 			break;
   330 			break;
   335 		case 2:
   331 		case 2: