// // DPBannerView.h // DacaiProject // // Created by WUFAN on 14-8-29. // Copyright (c) 2014年 dacai. All rights reserved. // #import @protocol DPBannerScrollViewDelegate @optional - (void)scrollViewDidBeginTracking:(UIScrollView *)scrollView; - (void)scrollViewDidEndTracking:(UIScrollView *)scrollView; @end @interface DPBannerScrollView : UIScrollView { @private struct { unsigned scrollViewDidBeginTracking : 1; unsigned scrollViewDidEndTracking : 1; } _bannerDelegateHas; } @end @protocol DPBannerViewDelegate; @interface DPBannerView : UIView @property (nonatomic, strong, readonly) DPBannerScrollView *scrollView; @property (nonatomic, weak) id delegate; @property (nonatomic, strong) NSArray *imageUrls; @property (nonatomic, assign) CGFloat duration; // 轮播间隔, 默认为5.0f @property (nonatomic, assign) NSInteger index; @property (nonatomic, assign) UIViewContentMode defalutContentModel; - (void)startAutoSwitch; - (void)stopAutoSwitch; @end @protocol DPBannerViewDelegate @optional - (void)bannerView:(DPBannerView *)bannerView didSelectedAtIndex:(NSInteger)index; - (void)bannerView:(DPBannerView *)bannerView didShowAtIndex:(NSInteger)index; @end