|
@@ -17,7 +17,7 @@
|
|
#import <ComPDFKit/ComPDFKit.h>
|
|
#import <ComPDFKit/ComPDFKit.h>
|
|
#import <compdfkit_tools/compdfkit_tools.h>
|
|
#import <compdfkit_tools/compdfkit_tools.h>
|
|
|
|
|
|
-@interface CPDFViewBaseController ()<UISearchBarDelegate,CPDFViewDelegate,CPDFListViewDelegate, CSearchToolbarDelegate, CPDFDisplayViewDelegate, CPDFBOTAViewControllerDelegate,CPDFSearchResultsDelegate, CPDFThumbnailViewControllerDelegate,CPDFPopMenuViewDelegate,UIDocumentPickerDelegate,CPDFPopMenuDelegate,CDocumentPasswordViewControllerDelegate>
|
|
|
|
|
|
+@interface CPDFViewBaseController ()<UISearchBarDelegate,CPDFViewDelegate,CPDFListViewDelegate, CSearchToolbarDelegate, CPDFDisplayViewDelegate, CPDFBOTAViewControllerDelegate,CPDFSearchResultsDelegate, CPDFThumbnailViewControllerDelegate,CPDFPopMenuViewDelegate,UIDocumentPickerDelegate,CPDFPopMenuDelegate,CDocumentPasswordViewControllerDelegate,CPDFPageEditViewControllerDelegate>
|
|
|
|
|
|
@property(nonatomic, strong) NSString *filePath;
|
|
@property(nonatomic, strong) NSString *filePath;
|
|
|
|
|
|
@@ -193,6 +193,28 @@
|
|
|
|
|
|
- (void)enterPDFPageEdit{
|
|
- (void)enterPDFPageEdit{
|
|
[self.popMenu hideMenu];
|
|
[self.popMenu hideMenu];
|
|
|
|
+
|
|
|
|
+ CPDFPageEditViewController *pageEditViewcontroller = [[CPDFPageEditViewController alloc] initWithPDFView:self.pdfListView];
|
|
|
|
+ pageEditViewcontroller.pageEditDelegate = self;
|
|
|
|
+ pageEditViewcontroller.modalPresentationStyle = UIModalPresentationFullScreen;
|
|
|
|
+ [self.navigationController presentViewController:pageEditViewcontroller animated:YES completion:nil];
|
|
|
|
+ [pageEditViewcontroller beginEdit];
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+#pragma mark - CPDFPageEditViewControllerDelegate
|
|
|
|
+
|
|
|
|
+- (void)pageEditViewControllerDone:(CPDFPageEditViewController *)pageEditViewController {
|
|
|
|
+ __weak typeof(self) weakSelf = self;
|
|
|
|
+ [weakSelf reloadDocumentWithFilePath:self.filePath password:nil completion:^(BOOL result) {
|
|
|
|
+ [weakSelf.pdfListView reloadInputViews];
|
|
|
|
+ }];
|
|
|
|
+
|
|
|
|
+ [weakSelf.pdfListView reloadInputViews];
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+- (void)pageEditViewController:(CPDFPageEditViewController *)pageEditViewController pageIndex:(NSInteger)pageIndex {
|
|
|
|
+ [self.pdfListView goToPageIndex:pageIndex animated:NO];
|
|
|
|
+ [self.navigationController popViewControllerAnimated:YES];
|
|
}
|
|
}
|
|
|
|
|
|
#pragma mark - Public method
|
|
#pragma mark - Public method
|