I am coding a cocoa app in visual studio, and building the storyboard through Xcode.
I have a TabViewController with 3 tabs, a method implemented to select a given tab, but I can't access it from another ViewController, because I can't access the instance of my TabViewController, only the class.
I'd like to do something like this when the button in the main ViewController is pressed :
Button1_Click(){ MyTabViewController.ChangeTab(1); }
My TabViewController and the other controller are paired with classes, I just can't get back the instance (like you could in Visual Studio for Windows by just writing the name of the controller).
I'm quite new to coding Mac apps, any help appreciated!
Edit : I'm creating a static property in TabViewController to get the instance back in the other class at the moment, works fine, but I think there's a better way around that.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…