1 Star 0 Fork 0

潘跃瑞 / RayPullToRefresh

Create your Gitee Account
Explore and code with more than 8 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
contribute
Sync branch
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;
        }

    }

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