You can't use NSMutableArray with CGPoint.

In other language we can just use " List<Template> ".

But in objective-c we use like this.

NSMutableArray * pointArray = [NSMutableArray array];

[pointArray addObject:[NSValue valueWithCGPoint:location]];

[pointArray addObject:[NSValue valueWithCGPoint:lastPoint]];


CGPoint retrievedPoint = [[pointArray objectAtIndex:0CGPointValue];

Turns out, we can only use NSMutableArray with a class or something that can make a instance with it.

So now you got a solution.

Have a good time~ 
Posted by ParkPill 박필

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 박필

CGPoint로는 MutableArray를 사용할 수가 없네;

왜 List를 만들어 놓지 않은 걸까;;

List<CGPoint> list;

이러면 얼마나 쉽니;;

암턴 해결 방법은 아래와 같다.

NSMutableArray * pointArray = [NSMutableArray array];

[pointArray addObject:[NSValue valueWithCGPoint:location]];

[pointArray addObject:[NSValue valueWithCGPoint:lastPoint]];


CGPoint retrievedPoint = [[pointArray objectAtIndex:0] CGPointValue];

Posted by ParkPill 박필
CGPoint a, b;
if(a == b)
이게 안되서 찾아보니 함수를 써야하는군 ㅎ

if (CGPointEqualToPoint(location, lastPoint)) {


Posted by ParkPill 박필