1234567891011121314151617181920212223242526272829303132 |
- //
- // KMWatermarkAdjectiveBaseView.swift
- // PDF Reader Pro
- //
- // Created by tangchao on 2022/12/17.
- //
- import Cocoa
- typealias KMWatermarkAdjectiveBaseViewItemClick = (Int, Any) ->()
- class KMWatermarkAdjectiveBaseView: NSView, NibLoadable {
-
- var itemClick: KMWatermarkAdjectiveBaseViewItemClick!
- var model: KMWatermarkModel!
-
- static var nibName: String? {
- return "KMWatermarkAdjectivePropertyBaseController"
- }
-
- static func createFromNib(in bundle: Bundle = Bundle.main) -> Self? {
- guard let nibName = nibName else { return nil }
- var topLevelArray: NSArray? = nil
- bundle.loadNibNamed(NSNib.Name(nibName), owner: nil, topLevelObjects: &topLevelArray)
- guard let results = topLevelArray else { return nil }
- let views = Array<Any>(results).filter { $0 is Self }
- return views.last as? Self
- }
-
- func setModel(model: KMWatermarkModel) {
- self.model = model
- }
- }
|