这里是我的代码如何将数组中的int值添加到NSNumber中?
我循环遍历数组并增加了NSNumber
。
NSNumber *totalValue = 0;
NSMutableArray *items = [10, 35, 25]; // Just for demo
for (int i=0; i < items.count; i++)
{
totalValue = totalValue + [items objectAtIndex:i] // How do I add the totalValue?
}
有人可以帮我用这段代码吗?
非常感谢您的帮助。 – HardCode