Browse Source

Merge branch 'compdfkit_demo_ios' of git.kdan.cc:others/kmpdfkit_demo into compdfkit_demo_ios

chenyu 1 year ago
parent
commit
e575b03e0f
17 changed files with 334 additions and 30 deletions
  1. 22 0
      Annotation-Ctrl-Demo/Annotation-Ctrl-Demo/Assets.xcassets/CPDFThunbnailImageEnter.imageset/Contents.json
  2. BIN
      Annotation-Ctrl-Demo/Annotation-Ctrl-Demo/Assets.xcassets/CPDFThunbnailImageEnter.imageset/btn_bota4.png
  3. BIN
      Annotation-Ctrl-Demo/Annotation-Ctrl-Demo/Assets.xcassets/CPDFThunbnailImageEnter.imageset/btn_bota4@2x.png
  4. 54 8
      Annotation-Ctrl-Demo/Annotation-Ctrl-Demo/CPDFViewController.m
  5. 34 2
      compdfkit-tools/compdfkit-tools.xcodeproj/project.pbxproj
  6. 21 0
      compdfkit-tools/compdfkit-tools/Annotation/PDFProperties/PDFSignature/CPDFSignatureEditViewController.h
  7. 26 0
      compdfkit-tools/compdfkit-tools/Annotation/PDFProperties/PDFSignature/CPDFSignatureEditViewController.m
  8. 23 0
      compdfkit-tools/compdfkit-tools/Annotation/PDFProperties/PDFSignature/CPDFSignatureViewCell.h
  9. 45 0
      compdfkit-tools/compdfkit-tools/Annotation/PDFProperties/PDFSignature/CPDFSignatureViewCell.m
  10. 21 0
      compdfkit-tools/compdfkit-tools/Annotation/PDFProperties/PDFSignature/CPDFSignatureViewController.h
  11. 26 0
      compdfkit-tools/compdfkit-tools/Annotation/PDFProperties/PDFSignature/CPDFSignatureViewController.m
  12. 3 0
      compdfkit-tools/compdfkit-tools/Common/Views/PDFAnnotationBar/CPDFAnnotationBar.h
  13. 7 7
      compdfkit-tools/compdfkit-tools/Common/Views/PDFAnnotationBar/CPDFAnnotationBar.m
  14. 5 0
      compdfkit-tools/compdfkit-tools/Common/Views/PDFView/PDFListView/CPDFListView.h
  15. 11 13
      compdfkit-tools/compdfkit-tools/Common/Views/PDFView/PDFListView/CPDFListView.m
  16. 3 0
      compdfkit-tools/compdfkit-tools/compdfkit_tools.h
  17. 33 0
      viewer-ctrl-demo/viewer-ctrl-demo/CPDFViewController.m

+ 22 - 0
Annotation-Ctrl-Demo/Annotation-Ctrl-Demo/Assets.xcassets/CPDFThunbnailImageEnter.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "filename" : "btn_bota4.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "btn_bota4@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
Annotation-Ctrl-Demo/Annotation-Ctrl-Demo/Assets.xcassets/CPDFThunbnailImageEnter.imageset/btn_bota4.png


BIN
Annotation-Ctrl-Demo/Annotation-Ctrl-Demo/Assets.xcassets/CPDFThunbnailImageEnter.imageset/btn_bota4@2x.png


+ 54 - 8
Annotation-Ctrl-Demo/Annotation-Ctrl-Demo/CPDFViewController.m

@@ -29,7 +29,7 @@
 
 @property(nonatomic, strong) NSString *navigationTitle;
 
-@property(nonatomic, strong) CPDFAnnotationBar *annotatiomBar;
+@property(nonatomic, strong) CPDFAnnotationBar *annotationBar;
 
 @end
 
@@ -79,11 +79,11 @@
     self.searchToolbar = [[CSearchToolbar alloc] initWithPDFView:self.pdfListView];
     self.searchToolbar.delegate = self;
     
-    self.annotatiomBar = [[CPDFAnnotationBar alloc] initPDFView:self.pdfListView];
-    self.annotatiomBar.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
-    self.annotatiomBar.delegate = self;
-    [self.annotatiomBar setParentVC:self];
-    [self.view addSubview:self.annotatiomBar];
+    self.annotationBar = [[CPDFAnnotationBar alloc] initPDFView:self.pdfListView];
+    self.annotationBar.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
+    self.annotationBar.delegate = self;
+    [self.annotationBar setParentVC:self];
+    [self.view addSubview:self.annotationBar];
     
     [self reloadDocumentWithFilePath:self.filePath completion:^(BOOL result) {
         
@@ -96,10 +96,10 @@
     if (@available(iOS 11.0, *)) {
         self.pdfListView.frame = CGRectMake(self.view.safeAreaInsets.left, self.view.safeAreaInsets.top, self.view.frame.size.width - self.view.safeAreaInsets.left - self.view.safeAreaInsets.right, self.view.frame.size.height - self.view.safeAreaInsets.bottom- self.view.safeAreaInsets.top);
         
-        self.annotatiomBar.frame = CGRectMake(0, self.view.frame.size.height - self.view.safeAreaInsets.bottom - 44, self.view.frame.size.width, 44);
+        self.annotationBar.frame = CGRectMake(0, self.view.frame.size.height - self.view.safeAreaInsets.bottom - 44, self.view.frame.size.width, 44);
     } else {
         self.pdfListView.frame = self.view.bounds;
-        self.annotatiomBar.frame = CGRectMake(0, self.view.frame.size.height  - 64, self.view.frame.size.width, 44);
+        self.annotationBar.frame = CGRectMake(0, self.view.frame.size.height  - 64, self.view.frame.size.width, 44);
     }
 }
 
@@ -188,6 +188,7 @@
 }
 
 - (void)PDFViewCurrentPageDidChanged:(CPDFView *)pdfView {
+    
 }
 
 #pragma mark - CPDFListViewDelegate
@@ -201,6 +202,51 @@
     return nil;
 }
 
+- (void)PDFViewPerformTouchEnded:(CPDFListView *)pdfView {
+    if (CPDFViewAnnotationModeNone != self.pdfListView.annotationMode) {
+        self.pdfListView.annotationMode = CPDFViewAnnotationModeNone;
+        [self.annotationBar reloadData];
+        return;
+    }
+    if (UIUserInterfaceIdiomPhone == UI_USER_INTERFACE_IDIOM()) {
+        if (self.navigationController.navigationBarHidden) {
+            [self.navigationController setNavigationBarHidden:NO animated:YES];
+            [UIView animateWithDuration:0.3 animations:^{
+                CGRect frame = self.annotationBar.frame;
+                frame.origin.y = self.view.bounds.size.height-frame.size.height;
+                self.annotationBar.frame = frame;
+                self.pdfListView.pageSliderView.alpha = 1.0;
+                self.annotationBar.topToolBar.alpha = 1.0;
+            }];
+        } else {
+            [self.navigationController setNavigationBarHidden:YES animated:YES];
+            [UIView animateWithDuration:0.3 animations:^{
+                CGRect frame = self.annotationBar.frame;
+                frame.origin.y = self.view.bounds.size.height;
+                self.annotationBar.frame = frame;
+                self.pdfListView.pageSliderView.alpha = 0.0;
+                self.annotationBar.topToolBar.alpha = 0.0;
+            }];
+        }
+    } else {
+        if (self.navigationController.navigationBarHidden) {
+            [self.navigationController setNavigationBarHidden:NO animated:YES];
+            [UIView animateWithDuration:0.3 animations:^{
+                self.pdfListView.pageSliderView.alpha = 1.0;
+                self.annotationBar.alpha = 1.0;
+                self.annotationBar.topToolBar.alpha = 1.0;
+            }];
+        } else {
+            [self.navigationController setNavigationBarHidden:YES animated:YES];
+            [UIView animateWithDuration:0.3 animations:^{
+                self.pdfListView.pageSliderView.alpha = 0.0;
+                self.annotationBar.alpha = 0.0;
+                self.annotationBar.topToolBar.alpha = 0.0;
+            }];
+        }
+    }
+}
+
 #pragma mark - CPDFMorelistViewDelegate
 
 - (void)PDFMoreListViewController:(CPDFMoreListViewController *)moreVC didSelectRow:(CPDFMoreListViewType)row {

+ 34 - 2
compdfkit-tools/compdfkit-tools.xcodeproj/project.pbxproj

@@ -66,9 +66,15 @@
 		C91BE7C62A0243E80038F2BC /* Image.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C91BE7C52A0243E70038F2BC /* Image.xcassets */; };
 		C91BE7C92A0347770038F2BC /* CPDFFontStyleTableView.h in Headers */ = {isa = PBXBuildFile; fileRef = C91BE7C72A0347770038F2BC /* CPDFFontStyleTableView.h */; };
 		C91BE7CA2A0347770038F2BC /* CPDFFontStyleTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = C91BE7C82A0347770038F2BC /* CPDFFontStyleTableView.m */; };
-		C91BE7CD2A037A490038F2BC /* CPDFInkTopToolBar.h in Headers */ = {isa = PBXBuildFile; fileRef = C91BE7CB2A037A490038F2BC /* CPDFInkTopToolBar.h */; };
+		C91BE7CD2A037A490038F2BC /* CPDFInkTopToolBar.h in Headers */ = {isa = PBXBuildFile; fileRef = C91BE7CB2A037A490038F2BC /* CPDFInkTopToolBar.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		C91BE7CE2A037A490038F2BC /* CPDFInkTopToolBar.m in Sources */ = {isa = PBXBuildFile; fileRef = C91BE7CC2A037A490038F2BC /* CPDFInkTopToolBar.m */; };
 		C91BE7D02A037B080038F2BC /* Image.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C91BE7CF2A037B080038F2BC /* Image.xcassets */; };
+		C91BE7D42A039AC40038F2BC /* CPDFSignatureViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = C91BE7D22A039AC40038F2BC /* CPDFSignatureViewController.h */; };
+		C91BE7D52A039AC40038F2BC /* CPDFSignatureViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C91BE7D32A039AC40038F2BC /* CPDFSignatureViewController.m */; };
+		C91BE7D82A039D2A0038F2BC /* CPDFSignatureViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = C91BE7D62A039D2A0038F2BC /* CPDFSignatureViewCell.h */; };
+		C91BE7D92A039D2A0038F2BC /* CPDFSignatureViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = C91BE7D72A039D2A0038F2BC /* CPDFSignatureViewCell.m */; };
+		C91BE7DC2A039E900038F2BC /* CPDFSignatureEditViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = C91BE7DA2A039E900038F2BC /* CPDFSignatureEditViewController.h */; };
+		C91BE7DD2A039E900038F2BC /* CPDFSignatureEditViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C91BE7DB2A039E900038F2BC /* CPDFSignatureEditViewController.m */; };
 		C9AF182629EE8AB600EC4979 /* UtilsColor.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C9AF182529EE8AB600EC4979 /* UtilsColor.xcassets */; };
 		C9AF182C29EFB1FC00EC4979 /* CPDFBookmarkViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = C9AF182A29EFB1FC00EC4979 /* CPDFBookmarkViewCell.h */; };
 		C9AF182D29EFB1FC00EC4979 /* CPDFBookmarkViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = C9AF182B29EFB1FC00EC4979 /* CPDFBookmarkViewCell.m */; };
@@ -137,7 +143,7 @@
 		F382636829EFD0D9003F1DFD /* CPDFPageIndicatorView.h in Headers */ = {isa = PBXBuildFile; fileRef = F382635F29EFD0D8003F1DFD /* CPDFPageIndicatorView.h */; };
 		F382636929EFD0D9003F1DFD /* CPDFPageIndicatorView.m in Sources */ = {isa = PBXBuildFile; fileRef = F382636029EFD0D8003F1DFD /* CPDFPageIndicatorView.m */; };
 		F382636A29EFD0D9003F1DFD /* CPDFSlider.m in Sources */ = {isa = PBXBuildFile; fileRef = F382636229EFD0D8003F1DFD /* CPDFSlider.m */; };
-		F382636B29EFD0D9003F1DFD /* CPDFSlider.h in Headers */ = {isa = PBXBuildFile; fileRef = F382636329EFD0D8003F1DFD /* CPDFSlider.h */; };
+		F382636B29EFD0D9003F1DFD /* CPDFSlider.h in Headers */ = {isa = PBXBuildFile; fileRef = F382636329EFD0D8003F1DFD /* CPDFSlider.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		F382636C29EFD0D9003F1DFD /* CPDFSliderImage.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F382636429EFD0D8003F1DFD /* CPDFSliderImage.xcassets */; };
 		F382636D29EFD0D9003F1DFD /* CPDFListView.m in Sources */ = {isa = PBXBuildFile; fileRef = F382636629EFD0D8003F1DFD /* CPDFListView.m */; };
 		F382636E29EFD0D9003F1DFD /* CPDFListView.h in Headers */ = {isa = PBXBuildFile; fileRef = F382636729EFD0D8003F1DFD /* CPDFListView.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -223,6 +229,12 @@
 		C91BE7CB2A037A490038F2BC /* CPDFInkTopToolBar.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CPDFInkTopToolBar.h; sourceTree = "<group>"; };
 		C91BE7CC2A037A490038F2BC /* CPDFInkTopToolBar.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CPDFInkTopToolBar.m; sourceTree = "<group>"; };
 		C91BE7CF2A037B080038F2BC /* Image.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Image.xcassets; sourceTree = "<group>"; };
+		C91BE7D22A039AC40038F2BC /* CPDFSignatureViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CPDFSignatureViewController.h; sourceTree = "<group>"; };
+		C91BE7D32A039AC40038F2BC /* CPDFSignatureViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CPDFSignatureViewController.m; sourceTree = "<group>"; };
+		C91BE7D62A039D2A0038F2BC /* CPDFSignatureViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CPDFSignatureViewCell.h; sourceTree = "<group>"; };
+		C91BE7D72A039D2A0038F2BC /* CPDFSignatureViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CPDFSignatureViewCell.m; sourceTree = "<group>"; };
+		C91BE7DA2A039E900038F2BC /* CPDFSignatureEditViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CPDFSignatureEditViewController.h; sourceTree = "<group>"; };
+		C91BE7DB2A039E900038F2BC /* CPDFSignatureEditViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CPDFSignatureEditViewController.m; sourceTree = "<group>"; };
 		C9AF182529EE8AB600EC4979 /* UtilsColor.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = UtilsColor.xcassets; sourceTree = "<group>"; };
 		C9AF182A29EFB1FC00EC4979 /* CPDFBookmarkViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CPDFBookmarkViewCell.h; sourceTree = "<group>"; };
 		C9AF182B29EFB1FC00EC4979 /* CPDFBookmarkViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CPDFBookmarkViewCell.m; sourceTree = "<group>"; };
@@ -466,6 +478,19 @@
 			path = PDFFreeText;
 			sourceTree = "<group>";
 		};
+		C91BE7D12A0399F40038F2BC /* PDFSignature */ = {
+			isa = PBXGroup;
+			children = (
+				C91BE7D22A039AC40038F2BC /* CPDFSignatureViewController.h */,
+				C91BE7D32A039AC40038F2BC /* CPDFSignatureViewController.m */,
+				C91BE7D62A039D2A0038F2BC /* CPDFSignatureViewCell.h */,
+				C91BE7D72A039D2A0038F2BC /* CPDFSignatureViewCell.m */,
+				C91BE7DA2A039E900038F2BC /* CPDFSignatureEditViewController.h */,
+				C91BE7DB2A039E900038F2BC /* CPDFSignatureEditViewController.m */,
+			);
+			path = PDFSignature;
+			sourceTree = "<group>";
+		};
 		C949FEE029EE70D000C30A8D /* Utils */ = {
 			isa = PBXGroup;
 			children = (
@@ -524,6 +549,7 @@
 		C9AF188A29F4C7C900EC4979 /* PDFProperties */ = {
 			isa = PBXGroup;
 			children = (
+				C91BE7D12A0399F40038F2BC /* PDFSignature */,
 				C91BE7C02A0234CB0038F2BC /* PDFFreeText */,
 				C918CECB29FA432D00D43974 /* PDFShape */,
 				C918CEC629FA13EF00D43974 /* PDFInk */,
@@ -872,6 +898,7 @@
 				4F6C796A29FBD532008C9501 /* CPDFEditFontNameSelectView.h in Headers */,
 				C91BE7CD2A037A490038F2BC /* CPDFInkTopToolBar.h in Headers */,
 				C918CEA529F8FC1800D43974 /* CPDFUnderlineViewController.h in Headers */,
+				C91BE7D82A039D2A0038F2BC /* CPDFSignatureViewCell.h in Headers */,
 				C918CECE29FA43B800D43974 /* CPDFShapeCircleViewController.h in Headers */,
 				C9AF184129F22BBD00EC4979 /* CPDFAnnotationBarButton.h in Headers */,
 				F32DA16F29ED904300E19ECA /* CSearchToolbar.h in Headers */,
@@ -901,8 +928,10 @@
 				C918CEDF29FB943400D43974 /* CPDFArrowStyleCell.h in Headers */,
 				F32DA17829ED904300E19ECA /* CPDFDisplayTableViewCell.h in Headers */,
 				C9B9EC4E29F52DBF00C6A5D2 /* AAPLCustomPresentationController.h in Headers */,
+				C91BE7D42A039AC40038F2BC /* CPDFSignatureViewController.h in Headers */,
 				F32DA17129ED904300E19ECA /* CPDFThumbnailViewController.h in Headers */,
 				C9B9EC5929F54E9600C6A5D2 /* CAnnotStyle.h in Headers */,
+				C91BE7DC2A039E900038F2BC /* CPDFSignatureEditViewController.h in Headers */,
 				F32DA16229ED904300E19ECA /* CPDFOutlineModel.h in Headers */,
 				4F1131BA29F911A800950564 /* CPDFTextPropertyCell.h in Headers */,
 				C9AF188E29F4C8A900EC4979 /* CPDFAnnotationBaseViewController.h in Headers */,
@@ -1026,6 +1055,7 @@
 				F32DA16729ED904300E19ECA /* CPDFOutlineViewController.m in Sources */,
 				C918CEA129F8F74000D43974 /* CPDFStrikeoutViewController.m in Sources */,
 				4F06AB5229F6792E007797E4 /* CPDFEditContextMenu.m in Sources */,
+				C91BE7D92A039D2A0038F2BC /* CPDFSignatureViewCell.m in Sources */,
 				F38F60C729EFF0C2008098F8 /* CPDFColorUtils.m in Sources */,
 				C9AF183C29F2198700EC4979 /* CPDFAnnotationBar.m in Sources */,
 				4F06AB5329F6792E007797E4 /* CPDFImageProperty.m in Sources */,
@@ -1037,6 +1067,7 @@
 				F32DA19229ED908800E19ECA /* CPDFMoreListViewController.m in Sources */,
 				C918CECA29FA140C00D43974 /* CPDFInkViewController.m in Sources */,
 				F382636929EFD0D9003F1DFD /* CPDFPageIndicatorView.m in Sources */,
+				C91BE7DD2A039E900038F2BC /* CPDFSignatureEditViewController.m in Sources */,
 				F32DA17229ED904300E19ECA /* CPDFThumbnailViewCell.m in Sources */,
 				F32DA18429ED904300E19ECA /* CActivityIndicatorView.m in Sources */,
 				4F6C796B29FBD532008C9501 /* CPDFEditFontNameSelectView.m in Sources */,
@@ -1050,6 +1081,7 @@
 				C918CE8229F621E200D43974 /* CPDFColorPickerView.m in Sources */,
 				F32DA17629ED904300E19ECA /* CPDFInfoViewController.m in Sources */,
 				C91BE7CE2A037A490038F2BC /* CPDFInkTopToolBar.m in Sources */,
+				C91BE7D52A039AC40038F2BC /* CPDFSignatureViewController.m in Sources */,
 				C918CE9C29F8EE7200D43974 /* CPDFHighlightViewController.m in Sources */,
 				C918CEE029FB943400D43974 /* CPDFArrowStyleCell.m in Sources */,
 				C9AF189829F4DA6A00EC4979 /* CPDFColorSelectView.m in Sources */,

+ 21 - 0
compdfkit-tools/compdfkit-tools/Annotation/PDFProperties/PDFSignature/CPDFSignatureEditViewController.h

@@ -0,0 +1,21 @@
+//
+//  CPDFSignatureEditViewController.h
+//  compdfkit-tools
+//
+//  Copyright © 2014-2023 PDF Technologies, Inc. All Rights Reserved.
+//
+//  THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
+//  AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
+//  UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
+//  This notice may not be removed from this file.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface CPDFSignatureEditViewController : UIViewController
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 26 - 0
compdfkit-tools/compdfkit-tools/Annotation/PDFProperties/PDFSignature/CPDFSignatureEditViewController.m

@@ -0,0 +1,26 @@
+//
+//  CPDFSignatureEditViewController.m
+//  compdfkit-tools
+//
+//  Copyright © 2014-2023 PDF Technologies, Inc. All Rights Reserved.
+//
+//  THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
+//  AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
+//  UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
+//  This notice may not be removed from this file.
+//
+
+#import "CPDFSignatureEditViewController.h"
+
+@interface CPDFSignatureEditViewController ()
+
+@end
+
+@implementation CPDFSignatureEditViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+}
+
+@end

+ 23 - 0
compdfkit-tools/compdfkit-tools/Annotation/PDFProperties/PDFSignature/CPDFSignatureViewCell.h

@@ -0,0 +1,23 @@
+//
+//  CPDFSignatureViewCell.h
+//  compdfkit-tools
+//
+//  Copyright © 2014-2023 PDF Technologies, Inc. All Rights Reserved.
+//
+//  THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
+//  AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
+//  UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
+//  This notice may not be removed from this file.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface CPDFSignatureViewCell : UITableViewCell
+
+@property (nonatomic, strong) UIImageView *signatureImageView;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 45 - 0
compdfkit-tools/compdfkit-tools/Annotation/PDFProperties/PDFSignature/CPDFSignatureViewCell.m

@@ -0,0 +1,45 @@
+//
+//  CPDFSignatureViewCell.m
+//  compdfkit-tools
+//
+//  Copyright © 2014-2023 PDF Technologies, Inc. All Rights Reserved.
+//
+//  THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
+//  AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
+//  UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
+//  This notice may not be removed from this file.
+//
+
+#import "CPDFSignatureViewCell.h"
+
+@implementation CPDFSignatureViewCell
+
+- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
+    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
+        self.signatureImageView = [[UIImageView alloc] init];
+        [self.contentView addSubview:self.signatureImageView];
+    }
+    return self;
+}
+
+- (void)layoutSubviews {
+    [super layoutSubviews];
+    CGFloat height = self.contentView.bounds.size.height;
+    CGFloat width  = height *  self.signatureImageView.image.size.width / self.signatureImageView.image.size.height;
+    width = MIN(width, self.contentView.bounds.size.width - 80.0);
+    [self.signatureImageView setFrame:CGRectMake((self.bounds.size.width - width)/2.0, 0.0, width, height)];
+    self.signatureImageView.center = self.contentView.center;
+}
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+@end

+ 21 - 0
compdfkit-tools/compdfkit-tools/Annotation/PDFProperties/PDFSignature/CPDFSignatureViewController.h

@@ -0,0 +1,21 @@
+//
+//  CPDFSignatureViewController.h
+//  compdfkit-tools
+//
+//  Copyright © 2014-2023 PDF Technologies, Inc. All Rights Reserved.
+//
+//  THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
+//  AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
+//  UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
+//  This notice may not be removed from this file.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface CPDFSignatureViewController : UIViewController
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 26 - 0
compdfkit-tools/compdfkit-tools/Annotation/PDFProperties/PDFSignature/CPDFSignatureViewController.m

@@ -0,0 +1,26 @@
+//
+//  CPDFSignatureViewController.m
+//  compdfkit-tools
+//
+//  Copyright © 2014-2023 PDF Technologies, Inc. All Rights Reserved.
+//
+//  THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
+//  AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
+//  UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
+//  This notice may not be removed from this file.
+//
+
+#import "CPDFSignatureViewController.h"
+
+@interface CPDFSignatureViewController ()
+
+@end
+
+@implementation CPDFSignatureViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+}
+
+@end

+ 3 - 0
compdfkit-tools/compdfkit-tools/Common/Views/PDFAnnotationBar/CPDFAnnotationBar.h

@@ -35,6 +35,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 @class CPDFAnnotationBar;
 @class CPDFListView;
+@class CPDFInkTopToolBar;
 
 @protocol CPDFAnnotationBarDelegate <NSObject>
 
@@ -56,6 +57,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property (nonatomic, readonly) CPDFListView *pdfListView;
 
+@property (nonatomic, strong) CPDFInkTopToolBar *topToolBar;
+
 - (void)reloadData;
 
 - (instancetype)initPDFView:(CPDFListView *)pdfListView;

+ 7 - 7
compdfkit-tools/compdfkit-tools/Common/Views/PDFAnnotationBar/CPDFAnnotationBar.m

@@ -70,7 +70,6 @@
         self.selectedIndex = -1;
         
         self.pdfListView = pdfListView;
-        self.pdfListView.performDelegate = self;
 
         [self initSubview];
     }
@@ -182,6 +181,7 @@
 #pragma mark - Action
 
 - (void)buttonItemClicked_Switch:(UIButton *)button {
+    self.pdfListView.performDelegate = self;
     self.propertiesBtn.userInteractionEnabled = YES;
     self.propertiesBtn.tag = button.tag;
     if (self.selectedIndex >= 0 && self.selectedIndex < self.annotationBtns.count) {
@@ -313,13 +313,13 @@
             [self.parentVC presentViewController:inkVC animated:YES completion:nil];
             
             if (@available(iOS 11.0, *)) {
-                CPDFInkTopToolBar *topToolBar = [[CPDFInkTopToolBar alloc] initWithFrame:CGRectMake(50, self.parentVC.view.safeAreaInsets.top, self.parentVC.view.frame.size.width-100, 50)];
-                topToolBar.autoresizingMask = UIViewAutoresizingFlexibleWidth;
-                [self.parentVC.view addSubview:topToolBar];
+                self.topToolBar = [[CPDFInkTopToolBar alloc] initWithFrame:CGRectMake(50, self.parentVC.view.safeAreaInsets.top, self.parentVC.view.frame.size.width-100, 50)];
+                self.topToolBar.autoresizingMask = UIViewAutoresizingFlexibleWidth;
+                [self.parentVC.view addSubview:self.topToolBar];
             } else {
-                CPDFInkTopToolBar *topToolBar = [[CPDFInkTopToolBar alloc] initWithFrame:CGRectMake(50, 64, self.parentVC.view.frame.size.width-100, 50)];
-                topToolBar.autoresizingMask = UIViewAutoresizingFlexibleWidth;
-                [self.parentVC.view addSubview:topToolBar];
+                self.topToolBar = [[CPDFInkTopToolBar alloc] initWithFrame:CGRectMake(50, 64, self.parentVC.view.frame.size.width-100, 50)];
+                self.topToolBar.autoresizingMask = UIViewAutoresizingFlexibleWidth;
+                [self.parentVC.view addSubview:self.topToolBar];
             }
         }
             break;

+ 5 - 0
compdfkit-tools/compdfkit-tools/Common/Views/PDFView/PDFListView/CPDFListView.h

@@ -43,6 +43,7 @@ typedef NS_ENUM(NSInteger, CPDFViewAnnotationMode) {
 #pragma mark - CPDFListViewDelegate
 
 @class CPDFListView;
+@class CPDFSlider;
 
 @protocol CPDFListViewDelegate <NSObject>
 
@@ -52,6 +53,8 @@ typedef NS_ENUM(NSInteger, CPDFViewAnnotationMode) {
 
 - (void)PDFViewPerformOpenNote:(CPDFListView *)pdfView forAnnotation:(CPDFAnnotation *)annotation;
 
+- (void)PDFViewPerformTouchEnded:(CPDFListView *)pdfView;
+
 @end
 
 #pragma mark - CPDFListView
@@ -60,6 +63,8 @@ typedef NS_ENUM(NSInteger, CPDFViewAnnotationMode) {
 
 @property (nonatomic, weak) id<CPDFListViewDelegate> performDelegate;
 
+@property (nonatomic, strong) CPDFSlider *pageSliderView;
+
 @property (nonatomic, assign) CToolModel toolModel;
 
 @property (nonatomic, assign) CPDFViewAnnotationMode annotationMode;

+ 11 - 13
compdfkit-tools/compdfkit-tools/Common/Views/PDFView/PDFListView/CPDFListView.m

@@ -29,8 +29,6 @@ typedef NS_ENUM(NSInteger, CPDFAnnotationDraggingType) {
 
 @interface  CPDFListView()
 
-@property (nonatomic, strong) CPDFSlider *pageSliderView;
-
 @property (nonatomic, strong) CPDFPageIndicatorView * pageIndicatorView;
 
 @property (nonatomic, assign) CPDFAnnotationDraggingType draggingType;
@@ -307,11 +305,11 @@ typedef NS_ENUM(NSInteger, CPDFAnnotationDraggingType) {
                     
 //                    [self showMenuForAnnotation:annotation];
 //
-//                    if (!self.activeAnnotation) {
-//                        if ([self.performDelegate respondsToSelector:@selector(PDFViewPerformTouchEnded:)]) {
-//                            [self.performDelegate PDFViewPerformTouchEnded:self];
-//                        }
-//                    }
+                    if (!self.activeAnnotation) {
+                        if ([self.performDelegate respondsToSelector:@selector(PDFViewPerformTouchEnded:)]) {
+                            [self.performDelegate PDFViewPerformTouchEnded:self];
+                        }
+                    }
                 }
             } else if (CPDFViewAnnotationModeLink == self.annotationMode) {
 //                if (CGRectIsEmpty(self.addLinkRect)) {
@@ -330,14 +328,14 @@ typedef NS_ENUM(NSInteger, CPDFAnnotationDraggingType) {
 //                [self addAnnotationFreeTextAtPoint:point forPage:page];
             } else if (CPDFViewAnnotationModeStamp == self.annotationMode) {
 //                [self addAnnotationAtPoint:point forPage:page];
-//                if ([self.performDelegate respondsToSelector:@selector(PDFViewPerformTouchEnded:)]) {
-//                    [self.performDelegate PDFViewPerformTouchEnded:self];
-//                }
+                if ([self.performDelegate respondsToSelector:@selector(PDFViewPerformTouchEnded:)]) {
+                    [self.performDelegate PDFViewPerformTouchEnded:self];
+                }
             } else if (CPDFViewAnnotationModeImage == self.annotationMode) {
 //                [self addAnnotationAtPoint:point forPage:page];
-//                if ([self.performDelegate respondsToSelector:@selector(PDFViewPerformTouchEnded:)]) {
-//                    [self.performDelegate PDFViewPerformTouchEnded:self];
-//                }
+                if ([self.performDelegate respondsToSelector:@selector(PDFViewPerformTouchEnded:)]) {
+                    [self.performDelegate PDFViewPerformTouchEnded:self];
+                }
             } else {
                 [self addAnnotation:self.annotationMode atPoint:point forPage:page];
             }

+ 3 - 0
compdfkit-tools/compdfkit-tools/compdfkit_tools.h

@@ -42,6 +42,8 @@
 // ListView
 #import <compdfkit_tools/CPDFListView.h>
 
+#import <compdfkit_tools/CPDFSlider.h>
+
 // PDFInfo
 #import <compdfkit_tools/CPDFInfoViewController.h>
 
@@ -56,6 +58,7 @@
 #import <compdfkit_tools/CPDFUnderlineViewController.h>
 #import <compdfkit_tools/CPDFStrikeoutViewController.h>
 #import <compdfkit_tools/AAPLCustomPresentationController.h>
+#import <compdfkit_tools/CPDFInkTopToolBar.h>
 
 //Edit
 #import <compdfkit_tools/CPDFEditToolBar.h>

+ 33 - 0
viewer-ctrl-demo/viewer-ctrl-demo/CPDFViewController.m

@@ -190,6 +190,39 @@
     return nil;
 }
 
+- (void)PDFViewPerformTouchEnded:(CPDFListView *)pdfView {
+    if (CPDFViewAnnotationModeNone != self.pdfListView.annotationMode) {
+        self.pdfListView.annotationMode = CPDFViewAnnotationModeNone;
+        return;
+    }
+    if (UIUserInterfaceIdiomPhone == UI_USER_INTERFACE_IDIOM()) {
+        if (self.navigationController.navigationBarHidden) {
+            [self.navigationController setNavigationBarHidden:NO animated:YES];
+            [UIView animateWithDuration:0.3 animations:^{
+                self.pdfListView.pageSliderView.alpha = 1.0;
+            }];
+        } else {
+            [self.navigationController setNavigationBarHidden:YES animated:YES];
+            [UIView animateWithDuration:0.3 animations:^{
+                self.pdfListView.pageSliderView.alpha = 0.0;
+            }];
+        }
+    } else {
+        if (self.navigationController.navigationBarHidden) {
+            [self.navigationController setNavigationBarHidden:NO animated:YES];
+            [UIView animateWithDuration:0.3 animations:^{
+                self.pdfListView.pageSliderView.alpha = 1.0;
+            }];
+        } else {
+            [self.navigationController setNavigationBarHidden:YES animated:YES];
+            [UIView animateWithDuration:0.3 animations:^{
+                self.pdfListView.pageSliderView.alpha = 0.0;
+            }];
+        }
+    }
+}
+
+
 #pragma mark - CPDFMorelistViewDelegate
 
 - (void)PDFMoreListViewController:(CPDFMoreListViewController *)moreVC didSelectRow:(CPDFMoreListViewType)row {