2

在下一行“//Crashing”插入导致崩溃的对象。

NSUInteger count=indexPath.row+1;
        NSMutableArray *arCells=[NSMutableArray array];
        for(NSDictionary *dInner in ar ) {
            [arCells addObject:[NSIndexPath indexPathForRow:count inSection:0]];
            if (tableView == self.searchDisplayController.searchResultsTableView)
              //crashing
              //  [self.FilterArray insertObject:dInner atIndex:count++];
            else
                [self.arForTable insertObject:dInner atIndex:count++];
            [insertedIndexPath addObject:[NSIndexPath indexPathForRow:count inSection:0]];
        }

崩溃日志:-

-[__NSArrayI insertObject:atIndex:]:无法识别的选择器发送到实例 0x9c754c0 2013-06-19 00:16:05.092 RA[2067:c07] * 由于未捕获的异常“NSInvalidArgumentException”而终止应用程序,原因:'-[__NSArrayI insertObject: atIndex:]: unrecognized selector sent to instance 0x9c754c0' * First throw call stack: (0x24a9012 0x198be7e 0x25344bd 0x2498bbc 0x249894e 0xeb4d 0x97f285 0x97f4ed 0x13895b3 0x2468376 0x2467e06 0x244fa82 0x244ef44 0x244ee1b 0x26e17e3 0x26e1668 0x8cfffc 0x2a4d 0x2975) libc++abi.dylib: terminate called throwing an exception

过滤器数组是可变数组,它有来自搜索结果的对象。我是UISearchdisplaycontroller

4

1 回答 1

3

听起来你的@property声明arForTable没有属性,所以没有保留

于 2013-06-18T18:56:21.820 回答