Browse Source

优化 - 转档SDK 版本信息显示

zhudongyong 1 year ago
parent
commit
a0bf88a8ea
1 changed files with 5 additions and 3 deletions
  1. 5 3
      KdanAutoTest/KdanAuto/ViewController.swift

+ 5 - 3
KdanAutoTest/KdanAuto/ViewController.swift

@@ -33,8 +33,6 @@ class ViewController : NSViewController, SettingViewControllerDelegate, AutoTest
     override func viewDidLoad() {
         super.viewDidLoad()
 
-        self.title = "KdanAuto:"+CPDFConvertKit.sharedInstance().versionString
-        
         customView.wantsLayer = true;
         customView.layer?.borderColor = NSColor.lightGray.withAlphaComponent(0.4).cgColor
         customView.layer?.borderWidth = 1
@@ -77,6 +75,10 @@ class ViewController : NSViewController, SettingViewControllerDelegate, AutoTest
                 }
             }
         }
+        
+        DispatchQueue.main.async {
+            self.view.window?.title = "KdanAuto:"+CPDFConvertKit.sharedInstance().versionString
+        }
     }
 
     override var representedObject: Any? {
@@ -187,7 +189,7 @@ class ViewController : NSViewController, SettingViewControllerDelegate, AutoTest
                     }
                     
                     DispatchQueue.main.async {
-                        self.title = "KdanAuto:"+CPDFConvertKit.sharedInstance().versionString
+                        self.view.window?.title = "KdanAuto:"+CPDFConvertKit.sharedInstance().versionString
                         
                         self._isProcessing = false
                         self.updateProcessStatus()