设为首页 加入收藏

TOP

上拉下拉基类(六)
2017-10-11 15:24:52 】 浏览:10842
Tags:下拉
nishedLabel.frame = CGRectMake(-10, 3, 20, 16);

        }

        self.unFinishedLabel.text = [YQZUtility getDisPlayNumString:unfinishValue];

        self.unFinishedLabel.hidden = NO;

    }

    else

    {

        self.unFinishedLabel.hidden = YES;

    }

    

    if (finishValue > 0) {

        if (finishValue > 99) {

            self.finishedlabel.frame = CGRectMake(120, 3, 20, 16);

        }

        self.finishedlabel.text = [YQZUtility getDisPlayNumString:finishValue];

        self.finishedlabel.hidden = NO;

    }

    else

    {

        self.finishedlabel.hidden = YES;

    }

}

 

#pragma mark -

#pragma mark UITableViewDataSource

 

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView

{

    return self.dataSource.count;

}

 

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section

{

    return 1;

}

 

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    static NSString *identifier = @"Cell";

    UITableViewCell *cell = [self.contentTableView dequeueReusableCellWithIdentifier:identifier];

    

    if (cell == nil){

            cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];

    }

 

    cell.textLabel.text = [NSString stringWithFormat:@"%ld,%ld",[indexPath section], [indexPath row]];

    return cell;

}

 

- (void)insertRowAtTop:(NSArray *)newDatas {

    

    int64_t delayInSeconds = 2.0;

    dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);

    dispatch_after(popTime, dispatch_get_main_queue(), ^(void){

        [self.contentTableView beginUpdates];

        NSRange range = NSMakeRange(0, [newDatas count]);

        NSIndexSet *indexSet = [NSIndexSet indexSetWithIndexesInRange:range];

        [self.dataSource insertObjects:newDatas atIndexes:indexSet];

        NSMutableArray *indexPaths = [NSMutableArray array];

        for (NSInteger i = 0; i < [newDatas count]; i++) {

            [indexPaths addObject:[NSIndexPath indexPathForRow:i inSection:0]];

        }

        [self.contentTableView insertRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationBottom];

        [self.contentTableView endUpdates];

        

        [self.contentTableView.pullToRefreshView stopAnimating];

    });

  

}

 

 

- (void)insertRowAtBottom:(NSArray *)newDatas {

    

    int64_t delayInSeconds = 2.0;

&n

首页 上一页 3 4 5 6 下一页 尾页 6/6/6
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇微信小程序开发系列(二)小程序.. 下一篇移动端开发之APP消息推送

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目