NSArray multiply each argument

Posted by seaworthy on Stack Overflow See other posts from Stack Overflow or by seaworthy
Published on 2010-04-16T02:18:09Z Indexed on 2010/04/16 2:23 UTC
Read the original article Hit count: 326

Filed under:
|
|

Is the there a way to multiply each NSNumber contained in the array by 10? Here is what I have so far:

NSMutableArray *vertex = [NSMutableArray arrayWithCapacity:3];

[vertex addObject:[NSNumber numberWithFloat:1.0]]; 
[vertex addObject:[NSNumber numberWithFloat:2.0]];
[vertex addObject:[NSNumber numberWithFloat:3.0]];

[vertex makeObjectsPerformSelector:@selector(doSomethingToObject:)];

I am not sure what selector to use to do this, please help!

© Stack Overflow or respective owner

Related posts about nsarray

Related posts about xcode