ScrollViewFreshEmpty 0.1.0

ScrollViewFreshEmpty 0.1.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release May 2017

Maintained by CHAT.


Downloads

Total72
Week9
Month45

Installs

Apps12
Apps WeekApps This Week 2
powered by Segment

GitHub

Stars2
Watchers1
Forks0
Issues0
Contributors1
Pull Requests0

Code

Files2
LOCLines of Code 147


 
Depends on:
MJRefresh>= 0
DZNEmptyDataSet>= 0
 

  • By
  • CHAT

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

Requirements

  • iOS 6.0+
  • ARC

Installation

ScrollViewFreshEmpty can be installed using CocoaPods

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