Forum Xamarin.iOS

InstantiateFromStoryboard inside Xamarin.iOS Binding Project, how it should be done?


I'm wrapping right now iOS Framework written in swift that i need to consume from Xamarin.iOS project. I successfully wrapped it and I'm able to consume swift classes in my C# code but, one method is not working properly.

public class func instantiateFromStoryboard() -> SomeViewController {
let storyboard = UIStoryboard(name: "Some", bundle: Bundle(for: SomeViewController.self))
return SomeViewController.instantiateFromStoryboard(storyboard)

This method is working just fine when framework is consumed by native app, but when called from wrapped code

var vc = SomeViewController.InstantiateFromStoryboard();

It returns simply null. I suppose it's because it isn't able to find corresponding storyboard file. But for one thing it's inside framework as .storyboardc and i tried including it inside binding library project.

Anyone tried something like this? What i should do to properly use storyboards from ios binding library?

Sign In or Register to comment.