CPDFImageViewController.m 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // CPDFImageViewController.m
  3. // PDFViewer
  4. //
  5. // Created by kdan on 2022/11/19.
  6. //
  7. #import "CPDFImageViewController.h"
  8. #import "CPDFImageView.h"
  9. #import "CPDFImagePreview.h"
  10. #import "Masonry.h"
  11. @interface CPDFImageViewController ()
  12. @end
  13. @implementation CPDFImageViewController
  14. - (void)viewDidLoad {
  15. [super viewDidLoad];
  16. // Do any additional setup after loading the view.
  17. _imagePreview = [[CPDFImagePreview alloc] init];
  18. _imageView = [[CPDFImageView alloc] init];
  19. [self.view addSubview:_imagePreview];
  20. [self.view addSubview:_imageView];
  21. UIEdgeInsets previewPadding = UIEdgeInsetsMake(0, 0, self.view.bounds.size.height / 3, 0);
  22. [_imagePreview mas_makeConstraints:^(MASConstraintMaker *make) {
  23. make.edges.equalTo(self.view).with.insets(previewPadding);
  24. }];
  25. UIEdgeInsets imageViewPadding = UIEdgeInsetsMake(430, 0, 0, 0);
  26. [_imageView mas_makeConstraints:^(MASConstraintMaker *make) {
  27. make.edges.equalTo(self.view).with.insets(imageViewPadding);
  28. }];
  29. }
  30. - (void)addTargets {
  31. }
  32. @end