先上圖,看一下是否符合你的場(chǎng)景吧!
Function Description
- 無限循環(huán)自動(dòng)滾動(dòng)卡片
- 三段式循環(huán)滾動(dòng)廣告卡片
how to use
1. 相關(guān)參數(shù)配置簡(jiǎn)述:各屬性均有其相應(yīng)default value,使用時(shí)亦可根據(jù)自己需求進(jìn)行相應(yīng)修改
a. 滾動(dòng)方向
/** banner滾動(dòng)方向 */
typedef NS_ENUM(NSUInteger, JhtBannerViewOrientation) {
// 橫向
BV_Orientation_Horizontal,
// 縱向
BV_Orientation_Vertical,
};
/** 滾動(dòng)方向
* default:BV_Orientation_Horizontal
*/
@property (nonatomic, assign) JhtBannerViewOrientation orientation;
b. alpha && space
/** 非當(dāng)前頁的透明比例(蒙板alpha)
* default:0.4
*/
@property (nonatomic, assign) CGFloat minCoverViewAlpha;
/** View之間的左右間距
* default:20.0
*/
@property (nonatomic, assign) CGFloat leftRightMargin;
/** 兩側(cè)小的View與中間View的高度差
* default:15.0
*/
@property (nonatomic, assign) CGFloat topBottomMargin;
c. 滾動(dòng) && 循環(huán)
/** 是否開啟自動(dòng)滾動(dòng)
* default:YES
*/
@property (nonatomic, assign) BOOL isOpenAutoScroll;
/** 是否開啟無限輪播
* default:YES
*/
@property (nonatomic, assign) BOOL isCarousel;
/** 自動(dòng)切換視圖的時(shí)間
* default:3.0
*/
@property (nonatomic, assign) NSTimeInterval autoTime;
2. Public Method:可根據(jù)自己需求使用相應(yīng)Method
/** 刷新視圖 */
- (void)reloadData;
/** 獲取可重復(fù)使用的卡片View(cardView) */
- (UIView *)dequeueReusableView;
/** 滾動(dòng)到指定的頁面 */
- (void)scrollToPageWithPageNumber:(NSUInteger)pageNumber;
/** 繼續(xù)滾動(dòng) */
- (void)scrollContinue;
/** 暫停滾動(dòng) */
- (void)scrollPause;
- 在demo中可以查看相關(guān)的使用和配置方法
GitHub主頁
CSDN Blog
Email:jinjob@icloud.com
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。