CPDFFreeTextAnnotation+CustomStamp.swift 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // CPDFFreeTextAnnotation+CustomStamp.swift
  3. // PDF Reader Pro
  4. //
  5. // Created by Niehaoyu on 2024/7/1.
  6. //
  7. import Foundation
  8. @objc extension CPDFFreeTextAnnotation {
  9. @objc static var _customStampAnnotationType = "customStampAnnotationType"
  10. @objc var customStampAnnotationType: String {
  11. get {
  12. return objc_getAssociatedObject(self, &Self._customStampAnnotationType) as? String ?? "0"
  13. }
  14. set {
  15. objc_setAssociatedObject(self, &Self._customStampAnnotationType, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
  16. }
  17. }
  18. }
  19. @objc extension CPDFStampAnnotation {
  20. @objc static var _customStampAnnotationType = "customStampAnnotationType"
  21. @objc var customStampAnnotationType: String {
  22. get {
  23. return objc_getAssociatedObject(self, &Self._customStampAnnotationType) as? String ?? "0"
  24. }
  25. set {
  26. objc_setAssociatedObject(self, &Self._customStampAnnotationType, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
  27. }
  28. }
  29. }