I'm sure this is a pretty simple answer, although I can't seem to figure out the syntax. I need an NSArray to contain the contents of a function return. (From Stanford CS193P)
NSArray *myPoints = [[NSArray alloc] [pointsForPolygonInRect:bounds numberOfSides:5]];
That obviously does not compile but hopefully illustrates my request
Code:
+ (NSArray *)pointsForPolygonInRect:(CGRect)rect numberOfSides:(int)numberOfSides
NSArray *myPoints = [[NSArray alloc] [pointsForPolygonInRect:bounds numberOfSides:5]];
That obviously does not compile but hopefully illustrates my request