KMSignatureHelpViewController.swift 1000 B

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // KMSignatureHelpViewController.swift
  3. // PDF Reader Pro
  4. //
  5. // Created by lizhe on 2023/10/9.
  6. //
  7. import Cocoa
  8. class KMSignatureHelpViewController: NSViewController {
  9. @IBOutlet weak var label: NSTextField!
  10. @objc var tipString: String = ""
  11. override init(nibName nibNameOrNil: NSNib.Name?, bundle nibBundleOrNil: Bundle?) {
  12. super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
  13. }
  14. required init?(coder: NSCoder) {
  15. super.init(coder: coder)
  16. }
  17. override func viewDidLoad() {
  18. super.viewDidLoad()
  19. // 设置视图背景颜色
  20. self.view.wantsLayer = true
  21. self.view.layer?.backgroundColor = NSColor(red: 54/255.0, green: 56/255.0, blue: 59/255.0, alpha: 1.0).cgColor
  22. // 设置标签字体和颜色
  23. self.label.font = NSFont(name: "SFProText-Regular", size: 12)
  24. self.label.textColor = NSColor.white
  25. self.label.stringValue = self.tipString
  26. }
  27. }