// // XLCycleScrollView.h // CycleScrollViewDemo // // Created by xie liang on 9/14/12. // Copyright (c) 2012 xie liang. All rights reserved. // #import #import "StyledPageControl.h" @protocol XLCycleScrollViewDelegate; @protocol XLCycleScrollViewDatasource; @interface XLCycleScrollView : UIView { UIScrollView *_scrollView; StyledPageControl *_pageControl; id __unsafe_unretained _delegate; id __unsafe_unretained _datasource; NSInteger _totalPages; NSInteger _curPage; NSMutableArray *_curViews; } - (id)initWithFrame:(CGRect)frame pcRect:(CGRect)pcRect; @property (nonatomic,readonly) UIScrollView *scrollView; @property (nonatomic,readonly) StyledPageControl *pageControl; @property (nonatomic,assign) NSInteger currentPage; @property (nonatomic,assign,setter = setDataource:) id datasource; @property (nonatomic,assign,setter = setDelegate:) id delegate; - (void)reloadData; - (void)setViewContent:(UIView *)view atIndex:(NSInteger)index; @end @protocol XLCycleScrollViewDelegate @optional - (void)didClickPage:(XLCycleScrollView *)csView atIndex:(NSInteger)index; @end @protocol XLCycleScrollViewDatasource @required - (NSInteger)numberOfPages; - (UIView *)pageAtIndex:(NSInteger)index; @end