GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - cherishloveyou/TMOTableView: TMOTableView includes RefreshControl LoadMoreControl FirstLoadControl, and you can customize it. It support iOS5+, support UIViewController & UITableViewController.

BranchesTags
Open more actions menu

Latest commit

 

History

17 Commits
17 Commits

Folders and files

NameName
Last commit message
Last commit date
Podspec
Podspec
 
 
Src
Src
 
 
TMOEmptyDataSetDemo
TMOEmptyDataSetDemo
 
 
TMOTableViewDemo
TMOTableViewDemo
 
 
Wiki
Wiki
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

TMOTableView

TMOTableView includes RefreshControl LoadMoreControl FirstLoadControl, and you can customize it. It support iOS5+, support UIViewController & UITableViewController.

  • V1.1 Released! We reconstruct whole project, make it much more readable. And we add one more demo, TMOEmptyDataSetDemo, it's really easy to use rather than DNZEmptyDataSet.

Usage

Pod

pod 'TMOTableView'

Subclass(Must Do)

  • Xib Or StoryBoard -> subclass UITableView To TMOTableView

  • Code -> Init TMOTableView


Use FirstLoadControl

  • You use FirstLoadControl to avoid null content showed, and perform good user experience. We provide a default loadingView, and we provide a default failView. Further more, you could custom it.

  • It's really easy to use, see example code.


[self.tableView firstLoadWithBlock:^(TMOTableView *tableView, DemoTableViewController *viewController) {
    //do something load data jobs
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(8.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        if (arc4random() % 10 < 3) {
            //We try to make load data jobs fail, and you can see what happen.
            [tableView.myFirstLoadControl fail];
        }
        else {
            viewController.numberOfRowsInSection0 = 5;
            viewController.numberOfRowsInSection1 = 8;
            [tableView.myFirstLoadControl done];//You don't need to use [tableView reloadData].
        }
    });
} withLoadingView:customLoadingView withFailView:customFailView];

Use RefreshControl

  • RefreshControl, you know that! Our RefreshControl support iOS5+.

[self.tableView refreshWithCallback:^(TMOTableView *tableView, DemoTableViewController *viewController) {
    viewController.numberOfRowsInSection0 = arc4random() % 10;
    viewController.numberOfRowsInSection1 = arc4random() % 10;
    [tableView.myRefreshControl done];
} withDelay:1.5];//Really easy to use.
//Don't use self in block! Use tableView, viewController. It will 'Circular references'.

Use LoadMoreControl

  • You use LoadMoreControl to show more cells.

[self.tableView loadMoreWithCallback:^(TMOTableView *tableView, DemoTableViewController *viewController) {
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        if (arc4random() % 10 < 4) {
            //try to fail
            [tableView.myLoadMoreControl fail];
        }
        else {
            viewController.numberOfRowsInSection1 += 10;
            [tableView.myLoadMoreControl done];
        }
    });
} withDelay:0.0];

About

TMOTableView includes RefreshControl LoadMoreControl FirstLoadControl, and you can customize it. It support iOS5+, support UIViewController & UITableViewController.

www.duowan.com

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

1 watching

Forks

22 forks
Report repository

Releases

Packages

Contributors

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.