Latest 0.1.2
Homepage https://github.com/CepheusSun/EmptyDataKit
License MIT
Platforms ios 8.0
Dependencies BlocksKit
Authors

EmptyDataKit 中文

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

EmptyDataKit is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "EmptyDataKit"

ScreenShot

this kit is also added to the other repository named SBAnimation and the demo in SBAnimation is cleaner more clearly. so sorry that I don’t want to replace this demo with SBAnimation . so I show you the screenshot in that demo here too. you can go there to read my codes if you need to.

Usage

Add the codes when you need to use EmptyDataKit, Such as ViewDidLoad

        __weak typeof(self) weakSelf = self;
        EmptyDataKit *kit = [[EmptyDataKit alloc] initWithEdk_Image:[UIImage imageNamed:@"common_pic_loadFail"] edk_Message:@"aaa" edk_reloadHandler:^{
            [weakSelf getData];
        }];
        kit.edk_error_image = [UIImage imageNamed: @""];
        kit.edk_error_message = @"网络错误";
        self.tableView.emptyKit = kit;

and we also provide you a enum like this

typedef NS_ENUM(NSUInteger ,EmptyDataType) {
    EDK_Loading,     // if there is a LoadingView, use this ,and also this is a default status.
    EDK_None,        // if there is some data, use this.
    EDK_Empty,       // if there is no data, use this.
    EDK_Error        // if there is some error such as network, use this.
};

so that if you want to show different image or description words you can use this. before you use reloadData method of this tebleView or collectionView.

Author

CepheusSun, [email protected]

License

EmptyDataKit is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "EmptyDataKit",
    "version": "0.1.2",
    "summary": "A simple and light framework helps you to add a friendly placeholder view when your UITableView or UICollectionView is empty with data",
    "description": "A simple and light framework helps you to add a friendly placeholder view when your UITableView or UICollectionView is empty with data. And EmptyDataKit is also very simple to use, you can only give the widget a property, and it will work.",
    "homepage": "https://github.com/CepheusSun/EmptyDataKit",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "CepheusSun": "[email protected]"
    },
    "source": {
        "git": "https://github.com/CepheusSun/EmptyDataKit.git",
        "tag": "0.1.2"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "EmptyDataKit/Classes/*",
    "dependencies": {
        "BlocksKit": []
    }
}

Pin It on Pinterest

Share This