How do I add a CGPoint to NSMutableArray?

前端 未结 6 1777
小蘑菇
小蘑菇 2021-02-01 13:58

I want to store my CGPoint to the NSMutable Array, so , I have method like this:

[self.points addObject:CGPointMake(x, y)];

But I got the error

6条回答
  •  执笔经年
    2021-02-01 14:12

    You can also do the following:

    [myArray addObject:[NSValue valueWithCGPoint:MyCGPoint]];
    

提交回复
热议问题