-
Notifications
You must be signed in to change notification settings - Fork 1
/
UIViewCarousel.h
51 lines (42 loc) · 1.5 KB
/
UIViewCarousel.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//
// UIViewCarousel.h
// Miso
//
// Created by Joshua Wu on 8/29/11.
// Copyright 2011 Miso. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@protocol UIViewCarouselDataSource;
@interface UIViewCarousel : UIView <UIScrollViewDelegate> {
NSMutableDictionary *_dequeueList;
NSMutableArray *_activeViews;
UIScrollView *_carousel;
int _currentIndex;
int _bufferSize;
int _numViews;
BOOL _enableViewBuffer;
id<UIViewCarouselDataSource> _dataSource;
id<UIScrollViewDelegate> _scrollDelegate;
UIPageControl *_pageControl;
BOOL _showPageControl;
BOOL _enableWrap;
}
@property (nonatomic, assign) int currentIndex;
@property (nonatomic, assign) BOOL enableViewBuffer;
@property (nonatomic, assign) BOOL showPageControl;
@property (nonatomic, assign) id<UIViewCarouselDataSource> dataSource;
@property (nonatomic, assign) BOOL enableWrap;
@property (nonatomic, assign) int bufferSize;
@property (nonatomic, retain) UIScrollView *carousel;
@property (nonatomic, retain) UIPageControl *pageControl;
@property (nonatomic, assign) id<UIScrollViewDelegate> scrollDelegate;
- (void)reloadData;
- (id)dequeueReuseableViewWithClass:(id)klass;
- (void)setCurrentIndex:(int)currentIndex animated:(BOOL)animated;
- (UIView *)activeViewWithTag:(NSInteger)tag;
@end
@protocol UIViewCarouselDataSource <NSObject>
- (int)numberOfViewsInViewCarousel:(UIViewCarousel *)viewCarousel;
- (UIView *)viewCarousel:(UIViewCarousel *)viewCarousel viewAtIndex:(int)index;
@end