objective c - How to implement delegate protocol between two NSViewControllers which are managed by an NSSplitViewController -
I'm new to Mac OS X development, I know how to work with the protocol in iOS app development and I understand how he works, now I have a small project in which there is a NSSplitViewController in which there are two NSSplitViewItems and that is related to NSViewControllers ProjectsVC and TasksVC, I am using xCode 6 with the storyboard
In ProjectsVC, let me find this pro Ocol is
@protocol projectsVCDelegate & lt; NSObject & gt; - (Zero) Selected Project: (JT Project ™) project; @end
The question is, how to get an example of ProjectsVC to set up a worker to work in ProjectsVc?
When you think of such problems, think about how to decompose things. In a way, your Split View Controller relationship will have to be managed. As soon as your ProjectsVc works as a representative for the JointProject, your Split View Controller can work as a representative for your projects VC. You can call a method by which the SVC knows something that it can take some care, and then it can do something in response, such as calling any method that works on efficiency.
BENEFIT: Projects know something about TaskCVC, TaskCVC does not know about projects they are managed by an object that uses those resources to fulfill more complex domain tasks. Is allowed.
To implement an Assign property project to project VCCLEG and Projects VC to Split View Controller VCDelegate Forwarding that Split View Controller Assigns itself Projects VC - (Zero) Selected Project: (JTPOJeked * ) Project {[self.projectCVDelegateForward was selected Project: Project];} Split View Controller - (Zero) Selected Project: (J. TTOject *) project {{self.tasksVC doSomethingRelatedTolectedProject: project];}
Comments
Post a Comment