CSignatureTextField.swift 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // CSignatureTextField.swift
  3. // ComPDFKit_Tools
  4. //
  5. // Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
  6. //
  7. // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
  8. // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
  9. // UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
  10. // This notice may not be removed from this file.
  11. //
  12. import UIKit
  13. class CSignatureTextField: UITextField {
  14. override func editingRect(forBounds bounds: CGRect) -> CGRect {
  15. let inset = CGRect(x: bounds.origin.x + 150, y: bounds.origin.y, width: bounds.size.width, height: bounds.size.height)
  16. return inset
  17. }
  18. override func textRect(forBounds bounds: CGRect) -> CGRect {
  19. let inset = CGRect(x: bounds.origin.x, y: bounds.origin.y, width: bounds.size.width, height: bounds.size.height)
  20. return inset
  21. }
  22. override func placeholderRect(forBounds bounds: CGRect) -> CGRect {
  23. let inset = CGRect(x: bounds.origin.x, y: bounds.origin.y, width: bounds.size.width, height: bounds.size.height)
  24. return inset
  25. }
  26. }