public
Description: Three20 is an Objective-C library for iPhone developers
Homepage: http://groups.google.com/group/three20/
Clone URL: git://github.com/facebook/three20.git
three20 / src / Three20 / TTTableViewController.h
100644 120 lines (97 sloc) 3.114 kb
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#import "Three20/TTModelViewController.h"
#import "Three20/TTTableViewDataSource.h"
 
@class TTActivityLabel;
 
@interface TTTableViewController : TTModelViewController {
  UITableView* _tableView;
  UIView* _tableBannerView;
  UIView* _tableOverlayView;
  UIView* _loadingView;
  UIView* _errorView;
  UIView* _emptyView;
  UIView* _menuView;
  UITableViewCell* _menuCell;
  id<TTTableViewDataSource> _dataSource;
  id<UITableViewDelegate> _tableDelegate;
  NSTimer* _bannerTimer;
  UITableViewStyle _tableViewStyle;
  UIInterfaceOrientation _lastInterfaceOrientation;
  BOOL _variableHeightRows;
}
 
@property(nonatomic,retain) UITableView* tableView;
 
/**
* A view that is displayed as a banner at the bottom of the table view.
*/
@property(nonatomic,retain) UIView* tableBannerView;
 
/**
* A view that is displayed over the table view.
*/
@property(nonatomic,retain) UIView* tableOverlayView;
 
@property(nonatomic,retain) UIView* loadingView;
@property(nonatomic,retain) UIView* errorView;
@property(nonatomic,retain) UIView* emptyView;
 
@property(nonatomic,readonly) UIView* menuView;
 
/**
* The data source used to populate the table view.
*
* Setting dataSource has the side effect of also setting model to the value of the
* dataSource's model property.
*/
@property(nonatomic,retain) id<TTTableViewDataSource> dataSource;
 
/**
* The style of the table view.
*/
@property(nonatomic) UITableViewStyle tableViewStyle;
 
/**
* Indicates if the table should support non-fixed row heights.
*/
@property(nonatomic) BOOL variableHeightRows;
 
/**
* Initializes and returns a controller having the given style.
*/
- (id)initWithStyle:(UITableViewStyle)style;
 
/**
* Creates an delegate for the table view.
*
* Subclasses can override this to provide their own table delegate implementation.
*/
- (id<UITableViewDelegate>)createDelegate;
 
/**
* Sets the view that is displayed at the bottom of the table view with an optional animation.
*/
- (void)setTableBannerView:(UIView*)tableBannerView animated:(BOOL)animated;
 
/**
* Shows a menu over a table cell.
*/
- (void)showMenu:(UIView*)view forCell:(UITableViewCell*)cell animated:(BOOL)animated;
 
/**
* Hides the currently visible table cell menu.
*/
- (void)hideMenu:(BOOL)animated;
 
/**
* Tells the controller that the user selected an object in the table.
*
* By default, the object's URLValue will be opened in TTNavigator, if it has one. If you don't
* want this to be happen, be sure to override this method and be sure not to call super.
*/
- (void)didSelectObject:(id)object atIndexPath:(NSIndexPath*)indexPath;
 
/**
* Asks if a URL from that user touched in the table should be opened.
*/
- (BOOL)shouldOpenURL:(NSString*)URL;
 
/**
* Tells the controller that the user began dragging the table view.
*/
- (void)didBeginDragging;
 
/**
* Tells the controller that the user stopped dragging the table view.
*/
- (void)didEndDragging;
 
/**
* The rectangle where the overlay view should appear.
*/
- (CGRect)rectForOverlayView;
 
/**
* The rectangle where the banner view should appear.
*/
- (CGRect)rectForBannerView;
 
@end