Code Monkey home page Code Monkey logo

bulletinview's Introduction

BulletinView

京东,淘宝快报效果 ##使用步骤:

1.在控制器引入 “TBBBulletinView.h“
2.初始化TBBBulletinView时需要传入两个参数:显示信息的数据数组dataArray与点击跳转页面url数组的urlArray
3.调用TBBBulletinView的方法-(void)didSelectTocController:(urlBlock)block在block设置跳转页面与url进行页面跳转

主要代码** NSArray *dataArr = @[@"第一个快报消息",@"第二个快报消息",@"第三个快报消息",@"第四个快报消息"]; NSArray *urlArray = @[@"https://www.baidu.com", @"http://www.163.com", @"http://www.youku.com", @"http://www.apple.com/cn/"]; TBBBulletinView *bView = [[TBBBulletinView alloc]initWithFrame:CGRectMake(0, 64.f, [UIScreen mainScreen].bounds.size.width, 40.f) titleArray:dataArr urlArray:urlArray];

[bView didSelectTocController:^(NSString *string) { //需要跳转到的控制器 TestViewController *tVC = [[TestViewController alloc]init]; tVC.urlString = string; [self.navigationController pushViewController:tVC animated:YES];

}];

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.