广告轮播
<h1>样式展示</h1>
<p><img src="https://www.showdoc.cc/server/api/common/visitfile/sign/ca4696a2af6d4d862b4c67fff7b688ee?showdoc=.jpg" alt="" />
向左轮播 滚动</p>
<h1>控件代码参数说明</h1>
<pre><code>-(instancetype)initWithFrame:(CGRect)frame withData:(NSArray*)contentArray withFont:(UIFont*)contentFont withColor:(UIColor*)contentColor withRadioImage:(UIImage*)radioImage withCloseImage:(UIImage* __nullable)closeImage;/*
* 初始化视图------ initWithFrame
* @param
frame 尺寸位置
contentArray 数组内容 类似{@"content":@""}
contentFont 内容字体大小
contentColor 内容的颜色
radioImage 广播的图片
closeImage 关闭图片
* @return id
*/
scrollTimer /*滚动的时间控制器*/
closeBlock /*关闭回调*/
tapActionBlock /*点击轮播信息回调*/</code></pre>
<h1>代码引用</h1>
<pre><code>#import "LLUIkit_ADScrollView.h"</code></pre>
<pre><code> LLUIkit_ADScrollView* adScrollView = [[LLUIkit_ADScrollView alloc]initWithFrame:CGRectMake(0, 0, LLCommon_SCREEN_Width, 39) withData:notiArray withFont:LLCommon_Font(14) withColor:LLCommon_HexColor(@"#F96A0E") withRadioImage:[UIImage imageNamed:@"notice"] withCloseImage:nil];
adScrollView.backgroundColor = LLCommon_HexColor(@"#FEFCEB");
[self.view addSubview:adScrollView];
adScrollView.closeBlock = ^{ };
__weak typeof(self) weakSelf = self;
adScrollView.tapActionBlock = ^(NSInteger index) {
};</code></pre>
<h1>代码使用样例</h1>
<pre><code> LLUIkit_ADScrollView* adScrollView = [[LLUIkit_ADScrollView alloc]initWithFrame:CGRectMake(0, 0, LLCommon_SCREEN_Width, 39) withData:notiArray withFont:LLCommon_Font(14) withColor:LLCommon_HexColor(@"#F96A0E") withRadioImage:[UIImage imageNamed:BMM_ImageNameString(@"notice")] withCloseImage:nil];
adScrollView.backgroundColor = LLCommon_HexColor(@"#FEFCEB");
[self.view addSubview:adScrollView];
adScrollView.closeBlock = ^{ };
__weak typeof(self) weakSelf = self;
adScrollView.tapActionBlock = ^(NSInteger index) {
NSLog(@"index====%ld", index);
if (obj.isLink.integerValue == 0) {
BMM_ShowWebViewController*showWebViewController =[[BMM_ShowWebViewController alloc]init];
showWebViewController.viewTitle = LLCommon_ChangeToString(obj.name);
showWebViewController.urlString = LLCommon_ChangeToString(obj.toAddress);
[weakSelf.navigationController pushViewController:showWebViewController animated:YES];
}
};</code></pre>