崩溃[self.collectionView performBatchUpdates:]

时间:2014-07-18 08:26:36

标签: objective-c

应用程序正在崩溃我不知道它似乎是苹果bug ..如果有人遇到同样的问题请更新我

[self.collectionView performBatchUpdates: —>// crashing here
    ^{
        if (indexToInsertAt == count)
        {
            // Add cell at end of list
            [self.restaurantList addObject:cellData];
            NSIndexPath *indexPath = [NSIndexPath indexPathForItem:indexToInsertAt
                                                         inSection:0];
            [self.collectionView insertItemsAtIndexPaths:@[indexPath]];
        }
        else
        {
            // Insert cell
            [self.restaurantList insertObject:cellData
                                      atIndex:indexToInsertAt];
            NSIndexPath *indexPath = [NSIndexPath indexPathForItem:indexToInsertAt
                                                         inSection:0];
            [self.collectionView insertItemsAtIndexPaths:@[indexPath]];
        }
    }
                                  completion:^(BOOL finished)
    {
        // Do nothing
    }];

崩溃日志在这里:

Crashed: com.apple.main-thread
SIGABRT ABORT at 0x3baff1f0
 raw
0
libsystem_kernel.dylib  
__pthread_kill + 8
10
Foundation  
-[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 90
11
UIKit   
__45-[UICollectionViewData validateLayoutInRect:]_block_invoke + 1206
12
UIKit   
-[UICollectionViewData validateLayoutInRect:] + 938
13
UIKit   
-[UICollectionView layoutSubviews] + 156
14
UIKit   
-[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 380
15
QuartzCore  
-[CALayer layoutSublayers] + 142
16
QuartzCore  
CA::Layer::layout_if_needed(CA::Transaction*) + 350
17
UIKit   
-[UIView(Hierarchy) layoutBelowIfNeeded] + 550
18
UIKit   
-[UICollectionView performBatchUpdates:completion:] + 170

崩溃正在发生,请帮帮我

提前感谢....

0 个答案:

没有答案