3
0

2 Ревизии 437f167743 ... 1086ff678f

Автор SHA1 Съобщение Дата
  chenyu 1086ff678f Merge branch 'compdfkit_demo_ios' of git.kdan.cc:others/kmpdfkit_demo into compdfkit_demo_ios преди 1 година
  chenyu d76758de4c PDFTools(iOS) - Fixed 17874【form】添加签名form,进入viewer-签名设置-文本签名,未输入文字前提下还能点save保存(应该是不能才对) преди 1 година
променени са 1 файла, в които са добавени 7 реда и са изтрити 0 реда
  1. 7 0
      compdfkit-tools/compdfkit-tools/Annotation/PDFProperties/PDFSignature/CPDFSignatureEditViewController.m

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

@@ -300,6 +300,13 @@
         }
     }else if (CSignatureTopBarText == self.selecIndex) {
         UIImage *image = [self captureScreenshotOfTextField:self.textField];
+        if(self.textField.text.length == 0) {
+            UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Info" message:@"Please input Signature" preferredStyle:UIAlertControllerStyleAlert];
+            UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleCancel handler:nil];
+            [alertController addAction:cancelAction];
+            [self presentViewController:alertController animated:YES completion:nil];
+            return;
+        }
         if (self.textField.text) {
             if(self.delegate && [self.delegate respondsToSelector:@selector(signatureEditViewController:image:)]) {
                 [self.delegate signatureEditViewController:self image:image];