123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- //
- // KMBatchOperateCompressSettingViewController.swift
- // PDF Reader Pro
- //
- // Created by lizhe on 2024/11/15.
- //
- import Cocoa
- typealias KMBatchOperateCompressSettingViewCancelAction = (_ controller: KMBatchOperateCompressSettingViewController ) -> Void
- typealias KMBatchOperateCompressSettingViewDoneAction = (_ controller: KMBatchOperateCompressSettingViewController ) -> Void
- class KMBatchOperateCompressSettingViewController: KMBaseViewController {
- @IBOutlet weak var doneButton: KMButton!
- @IBOutlet weak var cancelButton: KMButton!
- @IBOutlet weak var settingView: KMCompressSettingTableView!
-
- var cancelAction: KMBatchOperateCompressSettingViewCancelAction?
- var doneAction: KMBatchOperateCompressSettingViewDoneAction?
-
-
- override func viewDidLoad() {
- super.viewDidLoad()
- // Do view setup here.
-
- // 将按钮设置为第一响应者
- if let window = view.window {
-
- window.makeFirstResponder(doneButton.nextResponder)
- window.defaultButtonCell = doneButton.cell as? NSButtonCell
-
- window.contentMinSize = CGSizeMake(624, 513)
- window.contentMaxSize = CGSizeMake(624, 513)
- }
-
- }
- }
- extension KMBatchOperateCompressSettingViewController {
- @IBAction func cancelButtonAction(_ sender: Any) {
- guard let callBack = cancelAction else { return }
-
- callBack(self)
- }
-
- @IBAction func doneButtonAction(_ sender: Any) {
- guard let callBack = doneAction else { return }
-
- callBack(self)
- }
- }
|