CloudStorageBar.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //
  2. // CloudStorageBar.h
  3. // zhuxun
  4. //
  5. // Created by winsoft on 17/6/20.
  6. //
  7. //
  8. #import <UIKit/UIKit.h>
  9. //#define SegmentControllH 40
  10. #define SearchBarH 44.0f
  11. #define CloudStorageBarHeight SearchBarH //+ SegmentControllH
  12. typedef enum {
  13. SortTypeFileName,
  14. SortTypeFileTime
  15. }SortType;
  16. typedef enum {
  17. FileTypeAll = 0,
  18. FileTypePic = 1,
  19. FileTypeDoc = 2,
  20. FileTypeVideo = 3,
  21. FileTypeAudio = 4,
  22. FileTypeAudioOther = 5
  23. }CloudStorageBarFileType;
  24. typedef void(^BarNewFolderBlock)();
  25. typedef void(^BarSortBlock)(SortType sortType);
  26. typedef void(^FileClassBlock)(CloudStorageBarFileType fileType);
  27. @protocol CSSearchBarDelegate <NSObject>
  28. @optional
  29. - (void)searchBarPrepareToSearch;
  30. - (void)searchBarStartSearch:(UISearchBar *)searchBar withSearchContent:(NSString *)searchContent;
  31. - (void)searchBarCancerSearch;
  32. @end
  33. @interface CloudStorageBar : UIView
  34. @property (nonatomic , strong) BarNewFolderBlock barNewFolderBlock;
  35. @property (nonatomic , strong) BarSortBlock barSortBlock;
  36. @property (nonatomic , strong) FileClassBlock fileClassBlock;
  37. @property (nonatomic , assign) id<CSSearchBarDelegate> delegate;
  38. - (void)giveUpSearch;
  39. //是否进入搜索模式:屏蔽文件夹创建按钮.
  40. - (void)beSearchModel:(BOOL)searchModel;
  41. @end