Giter Site home page Giter Site logo

2952883085 / fmlistplaceholder Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yfming93/fmlistplaceholder

0.0 0.0 0.0 8.87 MB

A delightful Placeholder for List View (UITableView,UICollectionView).

Home Page: http://www.yfmingo.cn

License: MIT License

Ruby 2.79% Objective-C 97.21%

fmlistplaceholder's Introduction

FMListPlaceholder

platform languages cocoapods support

A delightful Placeholder for List View (UITableView, UICollectionView).

One line code handle empty list placeholder logic.

0x001 Different From Other Similar:

  • Placeholders are not displayed at first time while you enter the list. The logic is processed when the list is refreshed again after network request is completed.
  • Simple, efficient and practical, one line code can be integrated;
  • Provide a more comprehensive and highly customized effect.
  • The default effect can be replaced with one line code. Set your own global default effects. You can also customize the effect again in a special list.

0x002 Renderings

0x003 How to use

  • Use CocoaPods:
    • write pod "FMListPlaceholder" in the Podfile file.
    • Open terminal, cd the directory of project. run pod install.
    • Import the main file:#import <FMListPlaceholder.h>
  • Manual import:
    • Drag All files in the FMListPlaceholder folder to project.
    • Import the main file:#import "FMListPlaceholder.h"
One Line Use
_tableView.needPlaceholderView = YES;   //the same as UICollectionView

Or Use Below

Custom Global Default
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    
    [FMListPlaceholder fm_defaultBackgroundColor:UIColor.whiteColor coverName:@"xxx" tips:@"Sorroy,nil here!" tipsTextColor:UIColor.grayColor tipsFont:[UIFont systemFontOfSize:16] coverSize:CGSizeZero coverCenterYOffset:-30 coverSpaceToTips:10];

    return YES;
}

0x004 Custom

Custom One List
[_tableView fm_emptyCoverName:@"fm_placeholder_nil" emptyTips:@" "];
[_tableView fm_backgroundColor:[UIColor colorWithRed:0.91 green:0.90 blue:0.90 alpha:1.00] tipsTextColor:UIColor.redColor tipsFont:nil];
[_tableView fm_coverCenterYOffset:-80 coverSize:CGSizeMake(90, 120) coverSpaceToTips:20];
// the same as UICollectionView

Click Reload Handle
_tableView.reloadBlock = ^(UIScrollView *listView) {
  // Reload Handle is Here!
  // [listView.mj_header beginRefreshing]; // reloadData
};
Details (See the example program FMListPlaceholderExample for details)

0x005 Hope

  • If you have any questions during the process or want more interfaces to customize,you can issues me! Instead of giving me star, it is better to throw a bug to me!
  • If you want to participate in the maintenance of this project or have a good design style, welcome to pull request!
  • If you feel slightly discomfort in use, please contact me.
  • Hope to improve this project together, let it become more powerful, able to meet the needs of most users!

0x006 QQ Chat Room

0x007 Requirements

  • iOS 9.0 or later
  • Xcode 9.0 or later

0x008 Licenses

All source code is licensed under the MIT License.

fmlistplaceholder's People

Contributors

yfming93 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.