@[無限輪播圖] @[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
前言
如果我的代碼能幫助到你哪怕是一點點,請點一下star。謝謝你的支持,你的star是我的動力。
介紹
SCAdView 是一個支持2D平面效果和3D縮放效果 , 可定制上下左右方向滾動 , 有限/無限循環 輪播的輪播控件
安裝
手動安裝
下載源代碼并解壓,將目錄下SCAdView
文件夾添加到你的項目中
CocoaPods
創建或在你的 podfile中添加:
pod 'SCAdView'
然后到終端cd到目錄下執行 pod install
用法
在使用的時候,我們應該通過一個SCAdViewBuilder
對象來構造出SCAdView,而我們可以通過在構造方法中修改buidler中的屬性,來定制一個我們想要的 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。