12345678910111213141516171819202122232425262728293031323334353637383940 |
- //
- // KMGuideInfoWindow.swift
- // Cisdem PDFMaster
- //
- // Created by Niehaoyu on 2023/12/8.
- //
- import Cocoa
- class KMGuideInfoWindow: NSWindow {
- static var currentWindow: KMGuideInfoWindow!
-
- @objc static func currentWC() -> KMGuideInfoWindow {
- let nib = NSNib(nibNamed: NSNib.Name("KMGuideInfoWindow"), bundle: Bundle.main)
- var topLevelObjects: NSArray?
- if nib?.instantiate(withOwner: nil, topLevelObjects: &topLevelObjects) ?? false {
- for object in topLevelObjects ?? [] {
- if let window = object as? NSWindow {
- self.currentWindow = window as? KMGuideInfoWindow
- break
- }
- }
- }
- return currentWindow
- }
-
-
- override func awakeFromNib() {
- super.awakeFromNib()
-
- self.backgroundColor = NSColor.clear
- self.contentView?.wantsLayer = true
- self.contentView?.layer?.backgroundColor = NSColor.red.cgColor;
- self.isOpaque = false
-
- }
-
-
- }
|