zoukankan      html  css  js  c++  java
  • 使用MJRefresh自定义下拉刷新,上拉加载动画

    有时候我们需要自己设置下拉刷新,上拉加载动画的实现,这里主要是记录下使用MJRefresh自定义下拉刷新,上拉加载动画.....

    下拉刷新我们只需要继承MJRefreshGifHeader即可:

    实现代码如下:

    - (void)prepare{
        [super prepare];
        self.stateLabel.hidden = NO;
        self.lastUpdatedTimeLabel.hidden = YES;
        
        [self setImages:@[[UIImage imageNamed:@"v2_pullRefresh1"]] forState:MJRefreshStateIdle];
        [self setImages:@[[UIImage imageNamed:@"v2_pullRefresh2"]] forState:MJRefreshStatePulling];
        [self setImages:@[[UIImage imageNamed:@"v2_pullRefresh1"],[UIImage imageNamed:@"v2_pullRefresh2"]] forState:MJRefreshStateRefreshing];
    
        [self setTitle:@"下拉刷新" forState:MJRefreshStateIdle];
        [self setTitle:@"松开刷新" forState:MJRefreshStatePulling];
        [self setTitle:@"正在刷新" forState:MJRefreshStateRefreshing];
    
    }
  • 相关阅读:
    RF04 Variables
    RF06 Settings
    RF05 Keywords
    Nginx介绍
    javascript中的迷惑点
    javascript中的undefined和null
    常见博客网站的robots.txt
    CSS层叠样式表
    web前端校验
    了解javascript
  • 原文地址:https://www.cnblogs.com/pengsi/p/5990172.html
Copyright © 2011-2022 走看看