정수 값을 NSMutable 배열로 가져 오는 데 문제가 있습니다. 일치하는 태그 속성 값 (button1의 태그 값이 1 등)이있는 여러 개의 버튼이 화면에 있습니다. 버튼을 누르면 숫자 태그 값이 NSMutable 배열에 추가됩니다. 나중에 개체를 반복하여 쿼리를 작성하기 위해 어떤 값을 누르는 지 확인하려고합니다. 그러나 루프에서 SIGABRT 오류가 발생했습니다.NSMutable 배열에서 정수 데이터 검색
//pairNumber is the 'tag' value from a button
-(void) numberSearchArray:(NSInteger)pairNumber;
{
[self.queryPairs addObject:[NSNumber numberWithInt: pairNumber]];
}
//***************************
-(void)buildQuery:(BOOL *)function numberToUse:(NSInteger)number
{
//other code not shown
int pair_values [6];
int compare_total = [queryPairs count];
for (int x = 0; x<=compare_total-1; x++){
pair_values[x] = (NSUInteger)[queryPairs objectAtIndex:x]; //SIGABRT error
//code continued...
}