|
@@ -2316,34 +2316,6 @@ let KMColorPickerViewHeight: CGFloat = 64
|
|
|
// MARK: NSNotification
|
|
|
|
|
|
@objc func textDidChange(_ notification: Notification) {
|
|
|
-// self.isTextEdit = true
|
|
|
-//
|
|
|
-// if self.subType == KMSelfSignAnnotationFreeTextSubType.freeText && isannotationMode {
|
|
|
-// if let obj = notification.object as? NSObject {
|
|
|
-// for tAnnotation in annotations {
|
|
|
-// tAnnotation.setString(noteTextView.string)
|
|
|
-// }
|
|
|
-//
|
|
|
-// if obj.isEqual(to: noteTextView) {
|
|
|
-// UserDefaults.standard.set(noteTextView.string, forKey: SKAnnotationSelfSignPlaceHolderStringKey)
|
|
|
-// }
|
|
|
-//
|
|
|
-// if annotation.isKind(of: CPDFFreeTextAnnotation.self) {
|
|
|
-// textAnnotationImageView.image = annotationModel?.annotationImage
|
|
|
-// } else {
|
|
|
-// generalImageView.image = annotationModel?.annotationImage
|
|
|
-// }
|
|
|
-// }
|
|
|
-// } else {
|
|
|
-// if let obj = notification.object as? NSObject, obj.isEqual(to: noteTextView) {
|
|
|
-// for tAnnotation in self.annotations {
|
|
|
-// tAnnotation.setString(noteTextView.string)
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
- }
|
|
|
-
|
|
|
- @objc func textDidEndEditing(_ notification: Notification) {
|
|
|
self.isTextEdit = true
|
|
|
|
|
|
if self.subType == KMSelfSignAnnotationFreeTextSubType.freeText && isannotationMode {
|
|
@@ -2365,7 +2337,11 @@ let KMColorPickerViewHeight: CGFloat = 64
|
|
|
} else {
|
|
|
if let obj = notification.object as? NSObject, obj.isEqual(to: noteTextView) {
|
|
|
for tAnnotation in self.annotations {
|
|
|
- tAnnotation.setString(noteTextView.string)
|
|
|
+ if let markupNote = tAnnotation as? CPDFMarkupAnnotation {
|
|
|
+ markupNote.setMarkupText(noteTextView.string)
|
|
|
+ } else {
|
|
|
+ tAnnotation.setString(noteTextView.string)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|