小编Sha*_*dil的帖子

单元格动画停止分数必须大于起始分数

我在表视图单元格中使用动画...当单元格完全可见时,动画工作正常.如果当时任何单元格部分可见由于动画我的应用程序在行[_Mytableviewobject endUpdates]中崩溃了;

崩溃日志=因未捕获的异常'NSInternalInconsistencyException'而终止应用程序,原因:'单元格动画停止分数必须大于开始分数'

代码部分:

-(void)sectionHeaderView:(SectionHeaderView*)sectionHeaderView sectionOpened:(NSInteger)sectionOpened
{
     //ENSLog(self, _cmd);
    [_caseTable reloadData];
    NSInteger countOfRowsToInsert = 1;
    SectionInfo *sectionInfo = [self.sectionInfoArray objectAtIndex:sectionOpened];
    sectionInfo.open = YES;


    NSMutableArray *indexPathsToInsert = [[[NSMutableArray alloc] init] autorelease];
    for (NSInteger i = 0; i < countOfRowsToInsert; i++) 
    {
        [indexPathsToInsert addObject:[NSIndexPath indexPathForRow:i inSection:sectionOpened]];
    }

    NSMutableArray *indexPathsToDelete = [[[NSMutableArray alloc] init] autorelease];
    NSInteger previousOpenSectionIndex = self.openSectionIndex;
    if (previousOpenSectionIndex != NSNotFound)
    {
        SectionInfo *previousOpenSection = [self.sectionInfoArray objectAtIndex:previousOpenSectionIndex];
        previousOpenSection.open = NO;
        [previousOpenSection.headerView toggleOpenWithUserAction:NO];
        NSInteger countOfRowsToDelete = 1;
        for (NSInteger i = 0; …
Run Code Online (Sandbox Code Playgroud)

ios5

31
推荐指数
4
解决办法
9478
查看次数

标签 统计

ios5 ×1