I have a basic NSTabViewController with several tabs:
class MainTabViewController: NSTabViewController { override func viewDidLoad() { super.viewDidLoad()
I want to check every NSViewController if the hasChanges variable is true , then a message will appear:
"You have unsaved changes. Do you want to change the tab?"
If I check this in MainTabViewController , I get <NSTabView: 0x101e17a10> and I donβt know what to do with it.
If I try to use NSTabViewDelegate in my MyViewController , then I do not know how to delegate MainTabViewController in it. Where to attach it?
class MyViewController: HIDNSViewController { func tabView(_ tabView: NSTabView, didSelect tabViewItem: NSTabViewItem?) {
source share