Coder Social home page Coder Social logo

gjbannerview's Introduction

GJBanneView

This is a banner view of iOS ,which can auto play but is tight with SDWebImage.

and here is the screen shot

s

how to use

put the SourceLib into yout project and use it like below:

    // create a banner  and it's data from network
    GJBannerView *banner = [GJBannerView bannerViewWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.width*0.75) bannerSourceType:GJBannerViewSourceTypeNetWork bannerItemType:GJBannerViewItemTypeNormal autoPlay:YES];
    [self.view addSubview:banner];
    // set the page control posion 
    banner.bannerViewPageControlType = GJBannerViewPageControlTypeLeft;
    // set the data of banner and banner will show
    [banner setImageUrls:imageUrls titles:titles autoPlayTime:2];
    // create a banner with local file
    GJBannerView *secondBanner = [GJBannerView bannerViewWithFrame:CGRectMake(0, [UIScreen mainScreen].bounds.size.width *0.8, 
    [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.width*0.75 ) bannerSourceType:GJBannerViewSourceTypeLocal bannerItemType:GJBannerViewItemTypeNormal autoPlay:YES];
    //delegate to handle tap gesture it will pass the current page back
    secondBanner.delegate = self;
    [self.view addSubview:secondBanner];
    [secondBanner setImages:images titles:titles autoPlayTime:2.0];

others

I want to add more feature to my banner like making it can't scroll endless and something else in the feature

gjbannerview's People

Contributors

1212300114 avatar

Stargazers

 avatar

Watchers

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