UIPopoverListView.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. //
  2. // UIPopoverListView.h
  3. // UIPopoverListViewDemo
  4. //
  5. // Created by su xinde on 13-3-13.
  6. // Copyright (c) 2013年 su xinde. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @class UIPopoverListView;
  10. @protocol UIPopoverListViewDataSource <NSObject>
  11. @required
  12. - (UITableViewCell *)popoverListView:(UIPopoverListView *)popoverListView
  13. cellForIndexPath:(NSIndexPath *)indexPath;
  14. - (NSInteger)popoverListView:(UIPopoverListView *)popoverListView
  15. numberOfRowsInSection:(NSInteger)section;
  16. - (NSInteger)numberOfSectionsInUIPopoverListView:(UIPopoverListView *)popoverListView;
  17. -(NSString*)popoverListView:(UIPopoverListView*)popoverListView titleForHeaderInSection:(NSInteger)section;
  18. @end
  19. @protocol UIPopoverListViewDelegate <NSObject>
  20. @optional
  21. - (void)popoverListView:(UIPopoverListView *)popoverListView
  22. didSelectIndexPath:(NSIndexPath *)indexPath;
  23. - (void)popoverListViewCancel:(UIPopoverListView *)popoverListView;
  24. - (CGFloat)popoverListView:(UIPopoverListView *)popoverListView
  25. heightForRowAtIndexPath:(NSIndexPath *)indexPath;
  26. - (void)setDateText:(NSString*) dateText;
  27. @end
  28. @interface UIPopoverListView : UIView <UITableViewDataSource, UITableViewDelegate,UITextViewDelegate,UIWebViewDelegate,UITabBarDelegate>
  29. {
  30. UITableView *_listView;
  31. UILabel *_titleView;
  32. UIControl *_overlayView;
  33. UIDatePicker *_datePickerView;
  34. UIWebView *_webView;
  35. //id<UIPopoverListViewDataSource> _datasource;
  36. //id<UIPopoverListViewDelegate> _delegate;
  37. }
  38. @property (nonatomic, strong) id<UIPopoverListViewDataSource> datasource;
  39. @property (nonatomic, strong) id<UIPopoverListViewDelegate> delegate;
  40. @property (nonatomic, retain) UITableView *listView;
  41. @property (nonatomic, strong) UIDatePicker *datePickerView;
  42. @property (nonatomic,strong) UITextView *textView;;
  43. @property (nonatomic, copy) dispatch_block_t dateBlock;
  44. @property (nonatomic, copy) dispatch_block_t BackBlock;
  45. @property (nonatomic,strong) NSDictionary *detailDicArr;
  46. @property (nonatomic,strong) NSString *webViewLink;
  47. @property (nonatomic,assign)BOOL isCannotClickBackGround;
  48. @property (nonatomic,strong) NSString *ImageWeburl;
  49. - (void)setTitle:(NSString *)title;
  50. - (id)initWithFrame:(CGRect)frame isDateView:(BOOL)isDateView;
  51. - (void)show;
  52. - (void)dismiss;
  53. - (id)initWithFrame:(CGRect)frame isDetail:(NSString*)isDetail;
  54. - (id)initWithFrame:(CGRect)frame DateAndTimeTitle:(NSString*)title;
  55. - (id)initWithFrame:(CGRect)frame forTextView:(BOOL)isTextView;
  56. - (id)initWithFrame:(CGRect)frame forMapView:(NSString*)webViewLink;
  57. - (id)initWithFrame:(CGRect)frame imageName:(NSString*)name;
  58. @end