12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- //
- // CPDFImageViewController.m
- // PDFViewer
- //
- // Created by kdan on 2022/11/19.
- //
- #import "CPDFImageViewController.h"
- #import "CPDFImageView.h"
- #import "CPDFImagePreview.h"
- #import "Masonry.h"
- @interface CPDFImageViewController ()
- @end
- @implementation CPDFImageViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
- // Do any additional setup after loading the view.
- _imagePreview = [[CPDFImagePreview alloc] init];
- _imageView = [[CPDFImageView alloc] init];
- [self.view addSubview:_imagePreview];
- [self.view addSubview:_imageView];
-
- UIEdgeInsets previewPadding = UIEdgeInsetsMake(0, 0, self.view.bounds.size.height / 3, 0);
- [_imagePreview mas_makeConstraints:^(MASConstraintMaker *make) {
- make.edges.equalTo(self.view).with.insets(previewPadding);
- }];
- UIEdgeInsets imageViewPadding = UIEdgeInsetsMake(430, 0, 0, 0);
- [_imageView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.edges.equalTo(self.view).with.insets(imageViewPadding);
- }];
- }
- - (void)addTargets {
-
- }
- @end
|