我用了断点调试 发现Frames是有我需要的数据,但是在插入到statusFrameArr这个可变的数组的时候总是没有数据了
NSMutableArray *Frames = [NSMutableArray array];
for (LYStatus *status in statuses) {
LYStatusFrame *statusF = [[LYStatusFrame alloc] init];
statusF.status = status;
[Frames addObject:statusF];
}
NSIndexSet *indexSet = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, statuses.count)];
[self.statusFrameArr insertObjects:Frames atIndexes:indexSet]
换个方法不好吗?用addObjectWithArray