add numbers from array

How get the total sum of NSNumber's from a NSArray?


int sum = 0;
for (NSNumber * n in ad.pQuantity) {
sum += [n intValue];
}
NSLog(@"%d",sum);
Previous
Next Post »

ConversionConversion EmoticonEmoticon

:)
:(
=(
^_^
:D
=D
=)D
|o|
@@,
;)
:-bd
:-d
:p
:ng