Latest 1.1
Homepage https://github.com/WHeB/EmptyView
License MIT
Platforms ios 9.0
Frameworks UIKit
Authors

Requirements

Swift 4.0; iOS 9.0+

CocoaPods

pod 'WPEmptyView'

Usage

lazy var emptyView: WPEmptyView = {
        var style = WPEmptyStyle.init()
        style.orientation = .center
        style.buttonBgColor = UIColor.orange
        style.buttonRadius = 22
        let empty = WPEmptyView.init(frame: self.tableView.frame, 
                                     style: style, 
                                     title: "网络连接已断开", 
                                     detail: "请尝试刷新",
                                     imageName: "nullImg1", 
                                     buttonTitle: "重新加载") {  [weak self] (_) in
            // 重新加载
        }
        return empty
    }()

 self.tableView.emptyView = self.emptyView

Latest podspec

{
    "name": "WPEmptyView",
    "version": "1.1",
    "summary": "u4e3aViewu6dfbu52a0u7a7au6570u636eu9875u9762",
    "description": "u4e3aUIViewu589eu52a0u7a7au72b6u6001u9875u9762",
    "homepage": "https://github.com/WHeB/EmptyView",
    "license": "MIT",
    "authors": {
        "WHeB": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "swift_version": "4.0",
    "source": {
        "git": "https://github.com/WHeB/EmptyView.git",
        "tag": "1.1"
    },
    "source_files": "WPEmptyView/*.swift",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This