cocoaTouch/SDLOverrides/SDL_uikitview.m
changeset 2738 bfccb2ec4334
parent 2734 fb9ad1587054
child 2740 03df0573a9fd
equal deleted inserted replaced
2737:4d1406bc8b3e 2738:bfccb2ec4334
   274 			CGFloat currentDistanceOfPinching = distanceBetweenPoints([first locationInView:self], [second locationInView:self]);
   274 			CGFloat currentDistanceOfPinching = distanceBetweenPoints([first locationInView:self], [second locationInView:self]);
   275 			
   275 			
   276 			if (0 == initialDistanceForPinching) 
   276 			if (0 == initialDistanceForPinching) 
   277 				initialDistanceForPinching = currentDistanceOfPinching;
   277 				initialDistanceForPinching = currentDistanceOfPinching;
   278 
   278 
   279 			if (currentDistanceOfPinching < initialDistanceForPinching + kMinimumPinchDelta) {
   279 			if (currentDistanceOfPinching < initialDistanceForPinching + kMinimumPinchDelta)
   280 				NSLog(@"Outward pinch detected");
       
   281 				HW_zoomOut();
   280 				HW_zoomOut();
   282 			} else if (currentDistanceOfPinching > initialDistanceForPinching + kMinimumPinchDelta){
   281 			else if (currentDistanceOfPinching > initialDistanceForPinching + kMinimumPinchDelta)
   283 				NSLog(@"Inward pinch detected");
       
   284 				HW_zoomIn();
   282 				HW_zoomIn();
   285 			} 			
   283 
   286 			currentDistanceOfPinching = initialDistanceForPinching;
   284 			currentDistanceOfPinching = initialDistanceForPinching;
   287 			break;
   285 			break;
   288 		default:
   286 		default:
   289 			break;
   287 			break;
   290 	}
   288 	}