How do I add a CGPoint to NSMutableArray?

The problem is that CGPoint is actually just a C structure it is not an object:

struct CGPoint {
   CGFloat x;
   CGFloat y;
};
typedef struct CGPoint CGPoint;

If you are on the iPhone you can use the NSValue UIKit additions to convert the CGPoint to an NSValue object.

See this previous answer for examples: How can I add CGPoint objects to an NSArray the easy way?

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)