iOS - Jerky transform.Translate and transform.Rotate

hi, im developing a prototype and i want to make a gameobject rotate clockwise or anticlockwise when the player swipes up or down the screen. So far it is working but the movement is not smooth and i need the rotation to continue for as long as the player is touching the screen after the swipe. Please help me out on this. Heres the code

function Update () 

{

for (var touch : Touch in Input.touches)
	
	{
	
	if(touch.deltaPosition.y >= 1  && touch.position.x>250)
	
		transform.Rotate(Vector3(0,0,50) * Time.deltaTime);
		
		
		
	
	if(touch.deltaPosition.y <= -1 && touch.position.x>250)
	
		transform.Rotate(Vector3(0,0,-50) * Time.deltaTime);
	
	}
	
}

well i fixed it myself… heres the code if anyone needs:

var a = 0;
var b = 0;


function Update () 

{

for (var touch : Touch in Input.touches)
	
	{
	
	if(touch.deltaPosition.y >= 1  && touch.position.x>250)
	
		a = 1;
		
		//transform.Rotate(Vector3(0,0,50) * Time.deltaTime);
		
		
		
	if(touch.deltaPosition.y <= -1 && touch.position.x>250)
	
		b = 1;
		
		//transform.Rotate(Vector3(0,0,-50) * Time.deltaTime);
	
	if(a==1)
	
		{
		transform.Rotate(Vector3(0,0,50) * Time.deltaTime);
		}
		
	if(touch.phase == TouchPhase.Ended)
		a=0;
	
	if(b==1)
	
		{
		transform.Rotate(Vector3(0,0,-50) * Time.deltaTime);
		}
		
	if(touch.phase == TouchPhase.Ended)
		b=0;
	
	
	}
	
}