00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #import <Foundation/Foundation.h>
00018 #import <UIKit/UIKit.h>
00019
00020 @protocol TTTableViewDataSource;
00021 @class TTSearchTextFieldInternal;
00022 @class TTView;
00023
00024 @interface TTSearchTextField : UITextField <UITableViewDelegate> {
00025 TTSearchTextFieldInternal* _internal;
00026
00027 UITableView* _tableView;
00028 TTView* _shadowView;
00029 UIButton* _screenView;
00030
00031 UINavigationItem* _previousNavigationItem;
00032 UIBarButtonItem* _previousRightBarButtonItem;
00033
00034 NSTimer* _searchTimer;
00035 CGFloat _rowHeight;
00036
00037 BOOL _searchesAutomatically;
00038 BOOL _showsDoneButton;
00039 BOOL _showsDarkScreen;
00040
00041 id<TTTableViewDataSource> _dataSource;
00042 }
00043
00044 @property (nonatomic, readonly) UITableView* tableView;
00045 @property (nonatomic) CGFloat rowHeight;
00046
00047 @property (nonatomic, readonly) BOOL hasText;
00048 @property (nonatomic) BOOL searchesAutomatically;
00049 @property (nonatomic) BOOL showsDoneButton;
00050 @property (nonatomic) BOOL showsDarkScreen;
00051
00052 @property (nonatomic, retain) id<TTTableViewDataSource> dataSource;
00053
00054 - (void)search;
00055
00056 - (void)showSearchResults:(BOOL)show;
00057
00058 - (UIView*)superviewForSearchResults;
00059
00060 - (CGRect)rectForSearchResults:(BOOL)withKeyboard;
00061
00062 - (BOOL)shouldUpdate:(BOOL)emptyText;
00063
00064 @end