ScrollViewFreshEmpty 0.0.9

ScrollViewFreshEmpty 0.0.9

DocsDocumented
TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Apr 2017

Maintained by CHAT.


Downloads

Total4
Week1
Month4

Installs

Apps3
Apps WeekApps This Week 1
powered by Segment

GitHub

Stars2
Watchers1
Forks0
Issues0
Contributors1
Pull Requests0

Code

Files2
SizeIntegration Size 16 kb
LOCLines of Code 150


 
Depends on:
MJRefresh>= 0
DZNEmptyDataSet>= 0
 

  • By
  • CHAT

整合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];
      });
  }];