Latest 0.1.0
Homepage https://github.com/wochen85/ScrollViewFreshEmpty
License MIT
Platforms ios 6.0, requires ARC
Dependencies MJRefresh, DZNEmptyDataSet
Authors

一行代码搞定下拉刷新组件和UIScrollView空页面展现。
整合UIScrollView的下拉刷新、空页面显示,简化MJRefresh和DZNEmptyDataSet的使用。

Requirements

  • iOS 6.0+
  • ARC

Installation

ScrollViewFreshEmpty can be installed using CocoaPods

CocoaPods

Add the following to your podfile

pod 'ScrollViewFreshEmpty'

Usage

Using ScrollViewFreshEmpty in your app is very simple.

Example

#import "UIScrollView+FreshEmpty.h"

[self.tableView configFresh:[UIImage imageNamed:@"empty"] FreshTip:nil FreshTipColor:nil EmptyTip:@"暂无数据,请稍后重试" EmptyTipColor:nil TaskBlock:^{
        NSLog(@"刷新数据");

        dispatch_time_t delayTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC));
        dispatch_after(delayTime, dispatch_get_main_queue(), ^{
            [self.tableView endFresh];
        });
    }];
    [self.tableView beginFresh];

[self.tableView configLoadMore:@"向上拉加载更多" PullingTip:@"松开即可加载" FreshingTip:@"加载中,请稍候.." TipColor:nil TaskBlock:^{
      NSLog(@"加载更多...");

      dispatch_time_t delayTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC));
      dispatch_after(delayTime, dispatch_get_main_queue(), ^{
          [self.tableView endLoadMore:NO];
      });
  }];

Screenshots


Latest podspec

{
    "name": "ScrollViewFreshEmpty",
    "version": "0.1.0",
    "summary": "u6574u5408UIScrollViewu7684u4e0bu62c9u5237u65b0u3001u7a7au9875u9762u663eu793auff0cu7b80u5316MJRefreshu548cDZNEmptyDataSetu7684u4f7fu7528u3002",
    "homepage": "https://github.com/wochen85/ScrollViewFreshEmpty",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "CHAT": "[email protected]"
    },
    "source": {
        "git": "https://github.com/wochen85/ScrollViewFreshEmpty.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "6.0"
    },
    "requires_arc": true,
    "dependencies": {
        "MJRefresh": [],
        "DZNEmptyDataSet": []
    },
    "source_files": "ScrollViewFreshEmpty/ScrollViewFreshEmpty/*.{h,m}"
}

Pin It on Pinterest

Share This