cdts/xdts-ios 3/TreeHole/Code/Utility/OC_CWCarousel/CWCarouselProtocol.h

80 lines
1.9 KiB
C
Raw Normal View History

2023-07-27 09:20:00 +08:00
//
// CWCarouselProtocol.h
// CWCarousel
//
// Created by WangChen on 2018/4/3.
// Copyright © 2018年 ChenWang. All rights reserved.
//
#ifndef CWCarouselProtocol_h
#define CWCarouselProtocol_h
@class CWCarousel;
@protocol CWCarouselDelegate<NSObject>
/**
@param carousel
@param index
*/
- (void)CWCarousel:(CWCarousel *)carousel didSelectedAtIndex:(NSInteger)index;
@optional
/**
,
@param carousel
@param index ,
@param indexPathRow ,
*/
- (void)CWCarousel:(CWCarousel *)carousel didStartScrollAtIndex:(NSInteger)index indexPathRow:(NSInteger)indexPathRow;
/**
,
@param carousel
@param index ,
@param indexPathRow ,
*/
- (void)CWCarousel:(CWCarousel *)carousel didEndScrollAtIndex:(NSInteger)index indexPathRow:(NSInteger)indexPathRow;
@end
@protocol CWCarouselDatasource<NSObject>
/**
@return
*/
- (NSInteger)numbersForCarousel;
/**
@param carousel
@param indexPath cell实际下标
@param index
@return
*/
- (UICollectionViewCell *)viewForCarousel:(CWCarousel *)carousel indexPath:(NSIndexPath *)indexPath index:(NSInteger)index;
@end
@protocol CWCarouselPageControlProtocol<NSObject>
@required
/**
*/
@property (nonatomic, assign) NSInteger pageNumbers;
/**
*/
@property (nonatomic, assign) NSInteger currentPage;
- (void)setCurrentPage:(NSInteger)currentPage;
- (void)setPageNumbers:(NSInteger)pageNumbers;
@end
#endif /* CWCarouselProtocol_h */