Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

杰哥,我gitHub用的比较菜,这里有俩意见 #50

Closed
dong09000 opened this issue Mar 6, 2015 · 1 comment
Closed

杰哥,我gitHub用的比较菜,这里有俩意见 #50

dong09000 opened this issue Mar 6, 2015 · 1 comment

Comments

@dong09000
Copy link

1.nav后面的刷新控件在停止刷新时(didFinishRefresh),最好,alpha = 0
在willBeginRefresh的时候,alpaca = 1即可

2.可以增加接口.自定义不同的下拉动画和刷新动画,可以传入图片数组or自定义的Gif图

杰哥,我gitHub用的比较菜,会加油帮忙完善框架的

@heistings
Copy link

@dong09000 Check this out:

/**
 * UITableView + 下拉刷新 动画图片
 */
- (void)example02
{
    // 添加动画图片的下拉刷新
    // 设置回调(一旦进入刷新状态,就调用target的action,也就是调用self的loadNewData方法)
    [self.tableView addGifHeaderWithRefreshingTarget:self refreshingAction:@selector(loadNewData)];

    // 设置普通状态的动画图片
    NSMutableArray *idleImages = [NSMutableArray array];
    for (NSUInteger i = 1; i<=60; i++) {
        UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"dropdown_anim__000%zd", i]];
        [idleImages addObject:image];
    }
    [self.tableView.gifHeader setImages:idleImages forState:MJRefreshHeaderStateIdle];

    // 设置即将刷新状态的动画图片(一松开就会刷新的状态)
    NSMutableArray *refreshingImages = [NSMutableArray array];
    for (NSUInteger i = 1; i<=3; i++) {
        UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"dropdown_loading_0%zd", i]];
        [refreshingImages addObject:image];
    }
    [self.tableView.gifHeader setImages:refreshingImages forState:MJRefreshHeaderStatePulling];

    // 设置正在刷新状态的动画图片
    [self.tableView.gifHeader setImages:refreshingImages forState:MJRefreshHeaderStateRefreshing];
    // 在这个例子中,即将刷新 和 正在刷新 用的是一样的动画图片

    // 马上进入刷新状态
    [self.tableView.gifHeader beginRefreshing];

    // 此时self.tableView.header == self.tableView.gifHeader
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants