Code Monkey home page Code Monkey logo

btviewstate's Introduction

BTViewState

CI Status Version License Platform

Example

image To run the example project, clone the repo, and run pod install from the Example directory first.

使用

设置默认状态图片与提示


[BTViewStateProperty setImageNoData:[UIImage imageNamed:@"Common_problem_none records"] error:[UIImage imageNamed:@"Common_problem_no data"] network:[UIImage imageNamed:@"Common_problem_network"]];
[BTViewStateProperty setTitleNoData:@"暂无记录" error:@"失败" network:@"网络错误"];

指定视图状态

self.view.viewState = BTViewStateLoading;//加载中
self.view.viewState = BTViewStateDefault;//去除状态图,显示正常界面与数据等

tableView.viewState = BTViewStateLoading;

button.viewState = BTViewStateLoading;

更多视图属性设置


tableView.stateProperties.loadingAreaInsets = UIEdgeInsetsMake(152, 0, 0, 0);
tableView.stateProperties.contentVerticalOffset = -75;
tableView.stateProperties.noDataActionBlock = ^{
    [weakSelf reloadData];
};
view.stateProperties.labelOffset = -20;

[tableView.stateProperties setImage:UIImage.new forLoadState:BTViewStateNoData];

更多等......你探索

Installation

BTViewState is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'BTViewState'

Author

[email protected]

License

BTViewState is available under the MIT license. See the LICENSE file for more info.

btviewstate's People

Contributors

storm52 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.