1 Star 0 Fork 0

潘跃瑞 / RayPullToRefresh

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
Clone or Download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

RayPullToRefresh

下拉刷新类库,支持自定义动画

###默认动画效果

image

###缩放动画效果

image

###使用说明 需要在ViewControll中设置self.automaticallyAdjustsScrollViewInsets = false;

###添加下拉刷新功能

self.tableView.refresh(RayTableViewAnimateType.Default) { () -> () in
            self.delay(2.0, closure: { () -> () in
                self.size = 1;
                self.tableView.reloadData();
                self.tableView.completeDragRefresh();
            })
        }

###添加上啦加载更多功能

 self.tableView.more { () -> () in
            self.delay(2.0, closure: { () -> () in
                print("上啦加载更多...");
                self.size = self.size + 1;
                self.tableView.reloadData();
                self.tableView.completeDragMore();
            })
        }

###实现自定义的下拉动画 ###需要集成RayBaseHeadView基类实现

override func setState(newsState: RayHeadViewState) {
        self.state = newsState;
        switch(self.state){
        case RayHeadViewState.StateDragToRefresh: //下拉刷新
            break;
        case RayHeadViewState.StateLooseToRefresh://松开刷新
            break;
        case RayHeadViewState.StateRefreshing://刷新中
            break;
        case RayHeadViewState.StateDraging: //滑动中
            break;
        }

    }

Repository Comments ( 0 )

Sign in for post a comment

About

下拉刷新类库,支持自定义动画 expand collapse
Swift
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
Swift
1
https://gitee.com/panyaorui/RayPullToRefresh.git
git@gitee.com:panyaorui/RayPullToRefresh.git
panyaorui
RayPullToRefresh
RayPullToRefresh
master

Search