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);
int sum = 0;
for (NSNumber * n in ad.pQuantity) {
sum += [n intValue];
}
NSLog(@"%d",sum);
Sign up here with your email
ConversionConversion EmoticonEmoticon