0
이것은 배열에서 다른 NSNumbers를 하나의 문자열에 연결하기위한 코드입니다. 그러나 어떤 이유로 나는 시계 영역에서 이상한 결과를 얻습니다. NSLog의 결과는 정상입니다. 어쩌면 당신을 도울 수 있습니까?연결 문자열
for (int i = 0; i < [ViewController sharedInstance].safeZonesUserList.count; i++) {
int userIndex = [[[ViewController sharedInstance].safeZonesUserList objectAtIndex:i] intValue];
NSString *arrayValue = [NSString stringWithFormat:@"%d",userIndex];
usersList = [usersList stringByAppendingString:arrayValue];
if (i < ([ViewController sharedInstance].safeZonesUserList.count - 1)) {
usersList = [usersList stringByAppendingString:@","];
}
}
내 배열은 1 보유, 2,하지만 난 시계 영역에서 얻는 결과는 "1, 2, \ x8c @의 \ X01의 \의 x03206 \"
감사합니다,
그게 효과가 있습니까? –