12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- //
- // KMNBaseViewController.swift
- // PDF Reader Pro
- //
- // Created by tangchao on 2023/5/5.
- //
- import Cocoa
- class KMNBaseViewController: NSViewController {
-
- deinit {
- KMPrint(self.className + " deinit.")
-
- self.removeNotifations()
- }
-
- override func viewDidLoad() {
- super.viewDidLoad()
-
- self.addNotifations()
- }
-
- // Noti
- func addNotifations() {
- updateUIThemeColor()
- NotificationCenter.default.addObserver(self, selector: #selector(updateUIThemeColor), name: APPAppearanceChangedNotificationName, object: nil)
-
- updateUILanguage()
- NotificationCenter.default.addObserver(self, selector: #selector(updateUILanguage), name: APPLanguageChangedNotificationName, object: nil)
- }
-
- func removeNotifations() {
- NotificationCenter.default.removeObserver(self)
- }
-
- @objc func updateUIThemeColor() {}
-
- @objc func updateUILanguage() {}
-
- func initContentView() {}
-
- }
|