'How to create a corresponding ViewController class for a Storyboard ViewController in Xamarin
In a Xamarin iOS project, I have been using add -> new file -> ViewController and that creates a UIViewController class, a Designer file, and an XIB file. Everything is all well there.
I am now however making use of Main.storyboard and I added a new ViewController there (ProjectsViewController). I have already given it that class name inside Identity inspection, even though such a class doesn't exist yet.
I would like to get a view controller class for ProjectsViewController and I know I cannot just create ProjectsViewController.cs that inherits from UIVIewController.
What are the linking steps? I should eventually be able to access my controller outlets inside Xamarin (c# interface).
Solution 1:[1]
You can directly create ViewController outlet inside storyboard ,it will automatically create class in your project .
Open
Main.storyboardwith Xcode .Create a ViewController inside storyboard.
- Name the ViewController .
- Save and open visual studio ,you will see that
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | ColeX - MSFT |



