{"id":15561336,"url":"https://github.com/iwufan/djemptyview","last_synced_at":"2025-08-12T06:33:57.328Z","repository":{"id":56907498,"uuid":"162446114","full_name":"iwufan/DJEmptyView","owner":"iwufan","description":"Add an empty view to your table view with one line of codes.","archived":false,"fork":false,"pushed_at":"2019-09-26T07:47:40.000Z","size":92,"stargazers_count":5,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-23T22:47:02.745Z","etag":null,"topics":["empty-view","ios","no-network","nodata","swift","swift4","uitableview"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iwufan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-19T14:06:29.000Z","updated_at":"2023-04-18T20:47:55.000Z","dependencies_parsed_at":"2022-08-21T03:50:18.366Z","dependency_job_id":null,"html_url":"https://github.com/iwufan/DJEmptyView","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwufan%2FDJEmptyView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwufan%2FDJEmptyView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwufan%2FDJEmptyView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwufan%2FDJEmptyView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iwufan","download_url":"https://codeload.github.com/iwufan/DJEmptyView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250528694,"owners_count":21445511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["empty-view","ios","no-network","nodata","swift","swift4","uitableview"],"created_at":"2024-10-02T16:07:30.267Z","updated_at":"2025-04-23T22:47:13.056Z","avatar_url":"https://github.com/iwufan.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DJEmptyView\nAdd an empty view to your table view with one line of codes.\n\n![](https://github.com/iwufan/Resources/blob/master/Images/DJEmptyView/example1.gif)\n![](https://github.com/iwufan/Resources/blob/master/Images/DJEmptyView/example2.gif)\n![](https://github.com/iwufan/Resources/blob/master/Images/DJEmptyView/example3.gif)\n\n### Main Features!\n- Add an empty view to a table view or a view.\n### How To Install?\n##### Manual\nJust drag the `DJEmptyView` folder to your project. \n##### Cocoapods\n`pod 'DJEmptyView'`\n\nYou should also import this framework before you use it, like this `import DJEmptyView`.\n### How to use DJEmptyView?\nIt's very simple. only one function you should update. In your `loadData` function, you can just do this.\n```\nprivate func loadData() {\n        \n    MyService.request(target: .dataList, success: { (res) -\u003e (Void) in\n        // empty view start.\n        if dataArray.count == 0 {\n            self.tableView.reloadData()\n            self.tableView.dj_showEmptyView(DJEmptyView(tipInfo: \"no data\", imageName: \"img_no_data\"))\n            return\n        }\n            \n        self.tableView.dj_hideEmptyView()\n        // empty view end.\n        \n        // more codes\n    })\n}\n```\n### How to pull to refresh in empty view?\nYou do not need add any codes to support this function. You can just drag down the empty view.\n\nTips:\nYou should add below codes to your table view, otherwise there will be lines in the empty view.\n\n`tableView.separatorStyle = .none`\n\n### Note:\nYou can download the demo for example codes.\n### License\nMIT\n### Contact Me\n[悟饭哪](https://www.jianshu.com/u/819830158b47)\n\n#### Thanks\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiwufan%2Fdjemptyview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiwufan%2Fdjemptyview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiwufan%2Fdjemptyview/lists"}