Reputation: 11487
I am using Xamarin.IOS to develop an iOS mobile app. I have an existing native Storyboard that I am trying to utilize. Is it possible to import an existing Xcode Storyboard into the Xamarin project?
Upvotes: 4
Views: 3415
Reputation: 20279
I had the excercise to rename a solution. This is currently not possible. Therefore I created a new solution (with the final name I wanted to have). In Xamarin Studio I added the files (view controller together with designer.cs
files, storyboards, ...). Don't copy it in the file structure only because it's somehow stored in the project options. The designer.cs
files have to be put under the view controller files to get the same structure Xamarin uses.
To get everything to work you have to adapt the namespace
in the view controller and in the designer.cs
files! You should make shure that the correct storyboards are loaded (Project options -> iOS Application -> iPhone/iPod Deployment Info -> Main Interface) as Terry Westley stated.
You could also load the storyboard by code
Storyboard = UIStoryboard.FromName ("MainStoryboard_iPhone", null);
Now my view controller and storyboard works as expected.
Upvotes: 0
Reputation: 126
This will get you started:
If you want the project to have similar structure to the way Xamarin Studio would have created the project, put your Register attribute and outlets, etc, in a separate partial class file named YourViewController.designer.cs and move it under the main class file (drag it onto the main class file).
Upvotes: 2