Git Product home page Git Product logo

adpage's Introduction

#普通广告轮播 ###可无限循环 ###可拉伸放大 ###可外部加载网络图片 ###可设置页面指示位置 ###自定义页面指示样式动效 ###简单使用: 1、Storyboard拖拽一个UIView到你要放轮播的位置,约束好大小(当然也可以用代码方式) 2、Storyboard中将这个UIView的类设置为WMAdPageView 3、连接IBOutlet到ViewController 4、设置_adPageView的image和其他。

#import "WMAdPageView.h"

[_adPageFView setAdsWithImages:@[@"m1", @"m2", @"m3", @"m4", @"m5"]
                          block:^(NSInteger clickIndex){
                              NSLog(@"%ld", (long)clickIndex);
                          }];
[_adPageFView setBAutoRoll:YES];

###网络图片方式:
_adPageView.delegate = self; [_adPageView setAdsWithImages:@[@"xxxurl", @"xxxurl", @"xxxurl", @"xxxurl"] block:^(NSInteger clickIndex){ NSLog(@"%ld", (long)clickIndex); }]; [_adPageView setBAutoRoll:YES];

#pragma mark - WMAdPageViewDelegate
- (void)setWebImage:(UIImageView *)imgView imgUrl:(NSString *)imgUrl
{
    // 例如,使用SDWebImage
    [imgView sd_setImageWithURL:[NSURL URLWithString:imgUrl] placeholderImage:[UIImage imageNamed:@"default"]];
}

##自定义页面指示样式 ####继承TAAbstractDotView实现其中方法

#####欢迎star交流 图片版权:考满分网

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.