KMHomeWindowController.swift 752 B

123456789101112131415161718192021222324252627
  1. //
  2. // KMHomeWindowController.swift
  3. // PDF Master
  4. //
  5. // Created by lxy on 2022/10/10.
  6. //
  7. import Cocoa
  8. class KMHomeWindowController: NSWindowController {
  9. var homeViewController : KMHomeViewController!
  10. override func windowDidLoad() {
  11. super.windowDidLoad()
  12. self.window!.isMovableByWindowBackground = true
  13. self.window!.isOpaque = false
  14. self.window!.backgroundColor = NSColor.white
  15. self.window!.standardWindowButton(.miniaturizeButton)!.isHidden = false
  16. self.window!.standardWindowButton(.zoomButton)!.isHidden = false
  17. self.homeViewController = KMHomeViewController.init()
  18. self.window!.contentView!.addSubview(self.homeViewController.view)
  19. }
  20. }