JXTableView.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. //
  2. // JXTableView.h
  3. // shiku_im
  4. //
  5. // Created by flyeagleTang on 14-5-27.
  6. // Copyright (c) 2014年 Reese. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @protocol JXTableViewDelegate <NSObject>
  10. @optional
  11. - (void)tableView:(UITableView *)tableView touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
  12. - (void)tableView:(UITableView *)tableView touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event;
  13. - (void)tableView:(UITableView *)tableView touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
  14. - (void)tableView:(UITableView *)tableView touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
  15. @end
  16. typedef enum : NSUInteger {
  17. EmptyTypeNoData,
  18. EmptyTypeNetWorkError,
  19. } EmptyType;
  20. @interface JXTableView : UITableView
  21. {
  22. UILabel *_tipLabel;
  23. UIButton *_tipBtn;
  24. @private
  25. // id _touchDelegate;
  26. NSMutableArray* _pool;
  27. }
  28. @property (nonatomic,weak) id<JXTableViewDelegate> touchDelegate;
  29. @property (nonatomic,strong) UIImageView *empty;
  30. - (void) gotoFistArrayRow:(int)nnn;
  31. - (void)gotoLastRow:(BOOL)animated;
  32. - (void)gotoFirstRow:(BOOL)animated;
  33. - (void)gotoRow:(int)n;
  34. - (void)showEmptyImage:(EmptyType)emptyType;
  35. - (void)hideEmptyImage;
  36. - (void)onAfterLoad;
  37. -(void)addToPool:(id)p;
  38. -(void)delFromPool:(id)p;
  39. //-(void)clearPool:(BOOL)delObj;
  40. -(void)reloadRow:(int)n section:(int)section;//刷新一行
  41. -(void)insertRow:(int)n section:(int)section;//增加一行
  42. -(void)deleteRow:(int)n section:(int)section;//删除一行
  43. @end