I’m doing my best to read the documentation (Hello MAC, SourceWriter, Working with Storyboards, etc) about the GUI development paradigm, (MVC storyboards, Xamarin/xcode designer etc), and it’s been very helpful but in practice I’m running into several questions. I am new to MVC in general, although I understand the abstract idea, I’m stuck on how the pieces are represented by the Xamarin/Xcode workflow. I will try to keep this generic and high level so it will be useful for others as well.
1. For starters, any general comments you have on the difference/roles of a ViewController being represented in these two ways, relationships/conventions between them?
2. Using SourceWriter as an example, it seems that a ViewController.cs has been given to every scene, is it typically the case that every scene in the designer should have a corresponding ViewController.cs (or WIndowController.cs)?
3. Since they are not created automatically when a ViewController is added to the storyboard, is it my responsibility to add these new controller cs files for each scene into the xamarin sln project (assuming I want to expose some outlets/actions)?
4. If I create a new ViewController.cs to go with my new scene, how is it “connected” (technically speaking) to the VC entity in the designer? Is there some metadata that links them together? Or is the only actual connection made when I add an outlet and choose a specific VC.h file to drag the outlet into? The latter would imply it’s totally arbitrary which VC.cs the outlets are put in, and thus seeming disconnect between storyboard-view-controllers and cs-view-controllers. Perhaps the logical link between them is mere convention?
5. Why are there (sometimes) “view” cs code files? I understand view controllers needing a .cs presence for exposing outlets/actions to the rest of your cs code, but is the view itself not defined inside the storyboard file? With the view's members (buttons, labels, etc) exposed by outlets in the ViewController.cs. Of what value is a cs reference to the view itself? The only view.cs example I’ve seen has been empty, save for the boiler plate (Sourcewriter DefinitionsView.cs)
6. When I create a new ViewController.cs in Xamarin, it comes with a View.cs and a xib file? Are those needed? When you created all the Controller.cs files in SourceWriter, did you go in and remove the xib file and View.cs and it's declaration in the controller?