Bladeren bron

PageEdit(iOS)-页面编辑切换时会取消选中当前注释

dinglingui 1 jaar geleden
bovenliggende
commit
c8d1805d8c

+ 4 - 0
ComPDFKit_Tools/ComPDFKit_Tools/Common/Controls/PDFViewController/CPDFViewBaseController.m

@@ -333,6 +333,10 @@
 }
 
 - (void)buttonItemClicked_thumbnail:(id)sender {
+    if(self.pdfListView.activeAnnotations.count > 0) {
+        [self.pdfListView updateActiveAnnotations:@[]];
+        [self.pdfListView setNeedsDisplayForVisiblePages];
+    }
     CPDFThumbnailViewController *thumbnailViewController = [[CPDFThumbnailViewController alloc] initWithPDFView:self.pdfListView];
     thumbnailViewController.delegate = self;
     

+ 7 - 7
ComPDFKit_Tools/ComPDFKit_Tools/Common/Views/PDFView/PDFListView/CPDFListView.h

@@ -71,14 +71,8 @@ extern NSNotificationName const CPDFListViewAnnotationsOperationChangeNotificati
 
 - (NSArray<UIMenuItem *> *)PDFListView:(CPDFListView *)pdfListView customizeMenuItems:(NSArray *)MenuItems forPage:(CPDFPage *)page forPagePoint:(CGPoint)pagePoint;
 
-- (void)PDFListViewEditNote:(CPDFListView *)pdfListView forAnnotation:(CPDFAnnotation *)annotation;
-
-- (void)PDFListViewEditProperties:(CPDFListView *)pdfListView forAnnotation:(CPDFAnnotation *)annotation;
-
 - (void)PDFListViewPerformTouchEnded:(CPDFListView *)pdfListView;
 
-- (void)PDFListViewContentEditProperty:(CPDFListView *)pdfListView point:(CGPoint)point;
-
 - (void)PDFListViewChangedToolMode:(CPDFListView *)pdfListView forToolMode:(CToolModel)toolMode;
 
 - (void)PDFListViewChangedAnnotationType:(CPDFListView *)pdfListView forAnnotationMode:(CPDFViewAnnotationMode)annotationMode;
@@ -87,7 +81,9 @@ extern NSNotificationName const CPDFListViewAnnotationsOperationChangeNotificati
 
 - (void)PDFListViewAnnotationsOperationChange:(CPDFListView *)pdfListView;
 
-- (BOOL)PDFListViewerTouchEndedIsAudioRecordMedia:(CPDFListView *)pdfListView;
+- (void)PDFListViewEditNote:(CPDFListView *)pdfListView forAnnotation:(CPDFAnnotation *)annotation;
+
+- (void)PDFListViewEditProperties:(CPDFListView *)pdfListView forAnnotation:(CPDFAnnotation *)annotation;
 
 - (void)PDFListViewPerformPlay:(CPDFListView *)pdfView forAnnotation:(CPDFSoundAnnotation *)annotation;
 
@@ -95,12 +91,16 @@ extern NSNotificationName const CPDFListViewAnnotationsOperationChangeNotificati
 
 - (void)PDFListViewPerformRecordMedia:(CPDFListView *)pdfView atPoint:(CGPoint)point forPage:(CPDFPage *)page;
 
+- (BOOL)PDFListViewerTouchEndedIsAudioRecordMedia:(CPDFListView *)pdfListView;
+
 - (void)PDFListViewPerformAddStamp:(CPDFListView *)pdfView atPoint:(CGPoint)point forPage:(CPDFPage *)page;
 
 - (void)PDFListViewPerformAddImage:(CPDFListView *)pdfView atPoint:(CGPoint)point forPage:(CPDFPage *)page;
 
 - (void)PDFListViewPerformSignatureWidget:(CPDFListView *)pdfView forAnnotation:(CPDFSignatureWidgetAnnotation *)annotation;
 
+- (void)PDFListViewContentEditProperty:(CPDFListView *)pdfListView point:(CGPoint)point;
+
 @end
 
 #pragma mark - CPDFListView

+ 1 - 1
ComPDFKit_Tools/ComPDFKit_Tools/Forms/PDFFormBar/CPDFFormToolBar.m

@@ -272,7 +272,7 @@
 }
 
 - (void)updateStatus {
-    self.selectedIndex = - 1;
+    self.selectedIndex = 0;
     self.pdfListView.annotationMode = self.selectedIndex;
     [self.annotManage setAnnotStyleFromMode:self.selectedIndex];
     [self reloadData];

+ 5 - 0
PDFViewer/PDFViewer/CPDFViewController.m

@@ -776,6 +776,11 @@
 #pragma mark - Action
 
 - (void)buttonItemClicked_thumbnail:(id)sender {
+    if(self.pdfListView.activeAnnotations.count > 0) {
+        [self.pdfListView updateActiveAnnotations:@[]];
+        [self.pdfListView setNeedsDisplayForVisiblePages];
+    }
+
     CPDFPageEditViewController *pageEditViewcontroller = [[CPDFPageEditViewController alloc] initWithPDFView:self.pdfListView];
     pageEditViewcontroller.pageEditDelegate = self;
     pageEditViewcontroller.modalPresentationStyle = UIModalPresentationFullScreen;