'TOUCH'에 해당되는 글 2건

  1. 2011.08.17 [IPhone Dev] CGPoint Compare (1)
  2. 2011.08.10 [Objective C] Mouse(Touch) Location

In other language we use the following.

CGPoint a, b;
if(a == b)
But in the objective c manner it is like this.

CGPoint location;
CGPoint lastPoint; 

if (CGPointEqualToPoint(location, lastPoint)) {


pretty straight forward.

Have a good day. 
Posted by ParkPill 박필
 Getting location for touch!
Get the position!

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

    UITouch *touch = [touches anyObject];

    CGPoint location = [touch locationInView:touch.view];   


Posted by ParkPill 박필