1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- //
- // DPBannerView.h
- // DacaiProject
- //
- // Created by WUFAN on 14-8-29.
- // Copyright (c) 2014年 dacai. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- @protocol DPBannerScrollViewDelegate <UIScrollViewDelegate>
- @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<DPBannerViewDelegate> 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 <NSObject>
- @optional
- - (void)bannerView:(DPBannerView *)bannerView didSelectedAtIndex:(NSInteger)index;
- - (void)bannerView:(DPBannerView *)bannerView didShowAtIndex:(NSInteger)index;
- @end
|