Swift 实现下拉刷新 JxbRefresh

软件介绍

JxbRefresh 是采用Swift 实现的 iOS 下拉刷新。

正常下拉刷新:

self.taleView.addPullRefresh({ [weak self] in 
    dispatch_after(afterTime(3), dispatch_get_global_queue(0, 0), {
        self?.taleView.stopPullRefresh()
    })
})

gif 动画下拉刷新:

        let arrIdle: NSMutableArray = NSMutableArray.init(capacity: 0)
        for i in 1...60 {
            let name = String.init(format: "dropdown_anim__000%zd", i)
            let image = UIImage.init(named: name)
            arrIdle.addObject(image!)
        }

        let arrRefresh: NSMutableArray = NSMutableArray.init(capacity: 0)
        for i in 1...3 {
            let name = String.init(format: "dropdown_loading_0%zd", i)
            let image = UIImage.init(named: name)
            arrRefresh.addObject(image!)
        }

        self.taleView.addGifPullRefresh(idleImages: arrIdle, refreshImages: arrRefresh, closure: { [weak self] in
            dispatch_after(afterTime(3), dispatch_get_global_queue(0, 0), {
                self?.taleView.stopPullRefresh()
            })
        })


加载更多数据下拉刷新:

        self.taleView.addFooterRefresh(closure: {[weak self] in
            dispatch_after(afterTime(3), dispatch_get_global_queue(0, 0), {
                self?.taleView.stopPullRefresh()
//                self?.taleView.setFooterEnable(false)
            })
        })

本文地址:https://codercto.com/soft/d/5911.html

Build Your Own Web Site the Right Way Using HTML & CSS

Build Your Own Web Site the Right Way Using HTML & CSS

Ian Lloyd / SitePoint / 2006-05-02 / USD 29.95

Build Your Own Website The Right Way Using HTML & CSS teaches web development from scratch, without assuming any previous knowledge of HTML, CSS or web development techniques. This book introduces you......一起来看看 《Build Your Own Web Site the Right Way Using HTML & CSS》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

在线进制转换器
在线进制转换器

各进制数互转换器

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换