2011-09-22 67 views

回答

0

使用通過比較座標來使用這些事件來編寫你的邏輯。

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ 

    } 
    -(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{ 
     UITouch *aTouch = [touches anyObject]; 
     CGPoint point = [aTouch locationInView:self.view]; 
     NSLog(@"X%f",point.x); 
    } 

    - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{ 

    }