GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - VincentLJX/ZYAdView: 网易、淘宝广告循环滚动效果

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

24 Commits
24 Commits

Folders and files

NameName
Last commit message
Last commit date
AdView
AdView
 
 
README.md
README.md
 
 

Repository files navigation

Screenshots_Row

广告循环滚动 类似淘宝,网易新闻首页广告栏效果,需要sdwebImage的支持,仅仅只需要额外导入一个类文件!使用方法如下: CGFloat width = [UIScreen mainScreen].bounds.size.width;

NSArray *imagesURL = @[
                       @"https://ss0.baidu.com/-Po3dSag_xI4khGko9WTAnF6hhy/super/whfpf%3D425%2C260%2C50/sign=a41eb338dd33c895a62bcb3bb72e47c2/5fdf8db1cb134954a2192ccb524e9258d1094a1e.jpg",
                       @"http://c.hiphotos.baidu.com/image/w%3D400/sign=c2318ff84334970a4773112fa5c8d1c0/b7fd5266d0160924c1fae5ccd60735fae7cd340d.jpg",
                       @"http://www.5858baypgs.com/img/aHR0cDovL3BpYzE4Lm5pcGljLmNvbS8yMDEyMDEwNS8xMDkyOTU0XzA5MzE1MTMzOTExNF8yLmpwZw==.jpg"
                       ];

// 情景三:图片配文字(可选)
NSArray *titles = @[@"感谢您的支持,如果下载的",
                    @"代码在使用过程中出现问题",
                    @"您可以发邮件到[email protected]",
                    ];

//如果你的这个广告视图是添加到导航控制器子控制器的View上,请添加此句,否则可忽略此句
self.automaticallyAdjustsScrollViewInsets = NO;
//网络图片加载方法
adView = [AdView adScrollViewWithFrame:CGRectMake(0, 64, width, 172) imageLinkURL:imagesURL placeHoderImageName:@"placeHoder.jpg" pageControlShowStyle:UIPageControlShowStyleLeft];

// 是否需要支持定时循环滚动,默认为YES // adView.isNeedCycleRoll = YES;

[adView setAdTitleArray:titles withShowStyle:AdTitleShowStyleRight];

// 设置图片滚动时间,默认3s // adView.adMoveTime = 2.0;

//图片被点击后回调的方法
adView.callBack = ^(NSInteger index,NSString * imageURL)
{
    NSLog(@"被点中图片的索引:%ld---地址:%@",index,imageURL);
};
[self.view addSubview:adView];




//本地图片加载方法
NSArray *imagesURL = @[
@"123.jpg",
@"456.jpg",
@"789.jpg",
];

// 情景三:图片配文字(可选)
NSArray *titles = @[@"感谢您的支持,如果下载的",
@"代码在使用过程中出现问题",
@"您可以发邮件到[email protected]",
];

//如果你的这个广告视图是添加到导航控制器子控制器的View上,请添加此句,否则可忽略此句
self.automaticallyAdjustsScrollViewInsets = NO;

adView = [AdView adScrollViewWithFrame:CGRectMake(0, 64, width, 172) localImageLinkURL:imagesURL  pageControlShowStyle:UIPageControlShowStyleLeft];

About

网易、淘宝广告循环滚动效果

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.