@[無限輪播圖] @[3D輪播圖] @[廣告輪播圖]
SCAdView
Statement
If my code can help you even a little bit , please click star
. Thanks for your support , your star is my motivation.
Introduction
SCAdView is a carousel control which support the vertical or horizontal scrolling direction, finite / infinite loop carousel , with both 2D plane effect or 3D zoom effect.
Installation
Manual installation
download the code and unzip,then copy SCAdView
directory into your project.
CocoaPods
create or modify your podfile:
pod 'SCAdView'
and then pod install
Usage
The SCAdView should be created by a SCAdViewBuilder
,we can customize SCAdView by modifying a builder's property.
eg.
SCAdView *adView = [[SCAdView alloc] initWithBuilder:^(SCAdViewBuilder *builder) {
builder.adArray = arrayFromService;
builder.viewFrame = (CGRect){0,100,self.view.bounds.size.width,self.view.bounds.size.width/2.f};
builder.adItemSize = (CGSize){self.view.bounds.size.width/2.5f,self.view.bounds.size.width/4.f};
builder.minimumLineSpacing = 0;
builder.secondaryItemMinAlpha = 0.6;
builder.threeDimensionalScale = 1.45;
builder.itemCellNibName = @"SCAdDemoCollectionViewCell";
}];
About SCAdViewBuilder
Please read SCAdViewBuilder's interface in SCAdView.h
file.
Effects
SCAdView
前言
如果我的代碼能幫助到你哪怕是一點(diǎn)點(diǎn)服鹅,請點(diǎn)一下star。謝謝你的支持,你的star是我的動(dòng)力。
介紹
SCAdView 是一個(gè)支持2D平面效果和3D縮放效果 , 可定制上下左右方向滾動(dòng) , 有限/無限循環(huán) 輪播的輪播控件
安裝
手動(dòng)安裝
下載源代碼并解壓,將目錄下SCAdView
文件夾添加到你的項(xiàng)目中
CocoaPods
創(chuàng)建或在你的 podfile中添加:
pod 'SCAdView'
然后到終端cd到目錄下執(zhí)行 pod install
用法
在使用的時(shí)候艇纺,我們應(yīng)該通過一個(gè)SCAdViewBuilder
對象來構(gòu)造出SCAdView,而我們可以通過在構(gòu)造方法中修改buidler中的屬性,來定制一個(gè)我們想要的 SCAdView
eg.
SCAdView *adView = [[SCAdView alloc] initWithBuilder:^(SCAdViewBuilder *builder) {
builder.adArray = arrayFromService;
builder.viewFrame = (CGRect){0,100,self.view.bounds.size.width,self.view.bounds.size.width/2.f};
builder.adItemSize = (CGSize){self.view.bounds.size.width/2.5f,self.view.bounds.size.width/4.f};
builder.minimumLineSpacing = 0;
builder.secondaryItemMinAlpha = 0.6;
builder.threeDimensionalScale = 1.45;
builder.itemCellNibName = @"SCAdDemoCollectionViewCell";
}];
SCAdViewBuilder 的詳解
請到SCAdView.h
文件查閱SCAdViewBuilder的 interface富纸。