Objective c 在NSArray中迭代
有人能帮我修复我的代码吗。我试图做一些简单的事情,遍历包含NSString的整个数组,将它们转换为NSInteger,并将它们分配给NSInteger变量Objective c 在NSArray中迭代,objective-c,nsarray,fast-enumeration,Objective C,Nsarray,Fast Enumeration,有人能帮我修复我的代码吗。我试图做一些简单的事情,遍历包含NSString的整个数组,将它们转换为NSInteger,并将它们分配给NSInteger变量 for (NSInteger *itemF in myNSArray) { //WHERE "slotA" is an NSInteger and "itemF" is stored as an NSString and I wanna conver to NSInteger //and store is in th
for (NSInteger *itemF in myNSArray) {
//WHERE "slotA" is an NSInteger and "itemF" is stored as an NSString and I wanna conver to NSInteger
//and store is in the var.
slotA=itemF;
}
for (NSString *string in array)
{
NSInteger integer = [string integerValue];
}