Why I add the CGPoint in the NSMultable Array?

Posted by Tattat on Stack Overflow See other posts from Stack Overflow or by Tattat
Published on 2010-04-21T15:52:31Z Indexed on 2010/04/21 16:33 UTC
Read the original article Hit count: 408

Filed under:
|
|

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

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

But I got the error, it said that :

Incompatible type for argument 1 of "addObject".

So, I check out the API,

(void)addObject:(id)anObject

anObject The object to add to the end of the receiver's content. This value must not be nil.

So, I think the "CGPointMake" can make a Object, but it can't be assigned. What happens?

© Stack Overflow or respective owner

Related posts about opengl

Related posts about iphone-sdk