Coder Social home page Coder Social logo

slbottomtoastview's Introduction

SLBottomToastView

模仿IOS原生底部弹出框,进行相关信息展示

SLBottomToastView使用说明

功能说明:模仿IOS原生底部弹出框,进行相关信息展示

cocoapods导入文件

   SLBottomToastView (0.0.1)
   show messgae
   pod 'SLBottomToastView', '~> 0.0.1'
   - Homepage: https://github.com/boilWater/SLBottomToastView
   - Source:   https://github.com/boilWater/SLBottomToastView.git
   

使用实例:

//头文件引入
#import "SLBottomToastView.h"
#import "FactoryLeftCell.h"

实现相关协议SLBottomMessageBoxDataSource, SLBottomMessageBoxDelegate

在监听和相应事件中初始化 SLBottomToastView

SLBottomToastView *bottomToastView = [[SLBottomToastView alloc] init];
bottomToastView.dataSource = self;
bottomToastView.delegate = self;
[self.view addSubview:bottomToastView];

实现协议并在协议使用FactoryLeftCell初始化Cell

- (NSInteger)numberOfRowsInBottomToastView:(SLBottomToastView *)bottomToastView{
    return 4;
}

- (SLBottomToastViewCell *)bottomToastView:(SLBottomToastView *)bottomToastView cellForRowAtIndex:(NSInteger)index{
    SLBottomToastViewLeftCell *cell = (SLBottomToastViewLeftCell *)[FactoryLeftCell CreateBottomToastViewCell];
    cell.backgroundColor = [UIColor blueColor];
    cell.statusLabel.text = @"hello world!";
    cell.imageView.image = [UIImage imageNamed:@"education.png"];
    return cell;
}

API接口说明

/**
 *  设置buttom的动画
 *
 *  @param slBottomMessageBoxAnimationStyle animationStyle类型
 */
+ (void)setAnimationStyle:(SLBottomMessageBoxAnimationStyle) slBottomMessageBoxAnimationStyle;

slbottomtoastview's People

Contributors

boilwater avatar

Watchers

James Cloos avatar Carabineiro 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.