CPDFHeaderFooterAddController.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. //
  2. // HeaderFooterAlertViewController.h
  3. // PDFViewer
  4. //
  5. // Created by kdanmobile_2 on 2022/11/16.
  6. //
  7. #import <UIKit/UIKit.h>
  8. #import <ComPDFKit/CPDFHeaderFooter.h>
  9. #import <ComPDFKit/ComPDFKit.h>
  10. #import "CPDFHeaderFooterAddView.h"
  11. #import "CPDFHeaderFooterModel.h"
  12. #import "CPDFHeaderFooterTextTableView.h"
  13. #import "Masonry.h"
  14. NS_ASSUME_NONNULL_BEGIN
  15. #define kFormat @"^[ ]+$"
  16. typedef enum CGLocation {
  17. kHeader = 0,
  18. kFooter,
  19. }CGLocation;
  20. typedef enum CGAligment {
  21. kLeft = 0,
  22. kCenter,
  23. kRinght,
  24. }CGAligment;
  25. typedef struct PositionRec {
  26. CGLocation location;
  27. CGAligment aligment;
  28. }PositionRec;
  29. @protocol CPDFModelDataDelegate <NSObject>
  30. @optional
  31. - (void)changeHeaderFooterModelData:(CPDFHeaderFooterModel *)modelData;
  32. - (void)changBatesModelData:(CPDFHeaderFooterModel *)modelData;
  33. @end
  34. @interface CPDFHeaderFooterAddController : UIViewController <UITableViewDelegate,UITableViewDataSource,UITextFieldDelegate>
  35. - (id)initWithIamge:(UIImage *)image WithSize:(CGSize)size;
  36. - (void)initIamge;
  37. - (void)initNavigation;
  38. - (void)textFieldDidBeginEditing:(UITextField *)textField;
  39. - (void)cancelClick:(UIBarButtonItem *)btn;
  40. - (void)sliderChange:(UISlider *)slider;
  41. - (void)changeLocation:(UISegmentedControl *)sender;
  42. - (void)changeAligbment:(UISegmentedControl *)sender;
  43. - (void)showPages;
  44. - (void)initShowLabel;
  45. @property (nonatomic,assign) CGSize size;
  46. @property (nonatomic,strong) UIImage *image;
  47. @property (nonatomic,assign) PositionRec position;
  48. @property (nonatomic,strong) UILabel *showLabel;
  49. @property (nonatomic,strong) UIImageView *imageView;
  50. @property (nonatomic,strong) CPDFHeaderFooterModel *modelData;
  51. @property (nonatomic,weak) id<CPDFModelDataDelegate> delegate;
  52. @end
  53. NS_ASSUME_NONNULL_END