Skip to content
Browse files

The description of FantasyView.h, some methods and delegates.

  • Loading branch information...
1 parent 5ea1a7d commit 074e9ff9f4378f592cc099bca1b4772c08d2cfc4 wxin9 committed Jul 3, 2012
Showing with 40 additions and 1 deletion.
  1. +40 −1 README.md
View
41 README.md
@@ -1,4 +1,43 @@
FantasyView
===========
-FantasyView is a horizontal tableview.
+FantasyView is a horizontal tableview.
+
+FantasyView.h:
+
+#import <UIKit/UIKit.h>
+
+@protocol FantasyViewDataSource;
+@protocol FantasyViewDelegate;
+
+@interface FantasyView : UIView
+
+@property (nonatomic, retain) UITableView *tableView;
+@property (nonatomic, assign) id<FantasyViewDataSource> dataSource;
+@property (nonatomic, assign) id<FantasyViewDelegate> delegate;
+@property (nonatomic, assign) NSInteger currentIndex;
+@property (nonatomic, assign) BOOL pagingEnabled;
+
+- (void)reloadData;
+- (void)fantasyViewScrollToIndex:(NSInteger)index animation:(BOOL)animation;
+- (UIView *)getViewInFantasyViewWithIndex:(NSInteger)index;
+
+@end
+
+@protocol FantasyViewDelegate <NSObject>
+
+@optional
+- (void)fantasyView:(FantasyView *)fanView selectIndex:(NSInteger)index;
+- (void)fantasyView:(FantasyView *)fanView scrollToIndex:(NSInteger)index;
+
+@end
+
+@protocol FantasyViewDataSource <NSObject>
+
+@required
+- (CGFloat)fantasyView:(FantasyView *)fanView widthForIndex:(NSInteger)index;
+- (NSInteger)numberOfIndexForFantasyView:(FantasyView *)fanView;
+- (void)fantasyView:(FantasyView *)fanView setContentView:(UIView *)contentView ForIndex:(NSInteger)index;
+- (UIView *)fantasyView:(FantasyView *)fanView targetRect:(CGRect)targetRect ForIndex:(NSInteger)index;
+
+@end

0 comments on commit 074e9ff

Please sign in to comment.
Something went wrong with that request. Please try again.