一个广告图片无限轮播控件
##支持CocoaPods引入
pod 'JXBAdPageView'
##调用接口
@protocol JXBAdPageViewDelegate <NSObject>
/**
* 加载网络图片使用回调自行调用SDImage
*
* @param imgView
* @param imgUrl
*/
- (void)setWebImage:(UIImageView*)imgView imgUrl:(NSString*)imgUrl;
@end
/**
* 启动函数
*
* @param imageArray 设置图片数组
* @param block block,回调点击
*/
- (void)startAdsWithBlock:(NSArray*)imageArray block:(JXBAdPageCallback)block;
/**
* 停止轮播,释放内存
*/
- (void)stopAds;
##创建代码
JXBAdPageView* adView = [[JXBAdPageView alloc] initWithFrame:CGRectMake(0, 20, [UIScreen mainScreen].bounds.size.width, 150)];
adView.iDisplayTime = 2;
[adView startAdsWithBlock:@[@"m1",@"m2",@"m3",@"m4",@"m5"] block:^(NSInteger clickIndex){
NSLog(@"%d",clickIndex);
}];
[self.view addSubview:adView];
-(void)dealloc {
[adView stopAds];
}