简体   繁体   中英

Referencing Storyboard from Xamarin.iOS Binding Library

In my Xamarin project i need to reference native iOS Framework through Binding Library. Besides native code, this framework provides few storyboards. How can i reference them in my app?

Calling standard UIStoryboard.FromName results in not found exception.

var storyboard = UIStoryboard.FromName("FromFramework", null);

Passing null as a Bundle parameter means that i search storyboard in main application bundle which obviously ends with exception "Could not find a storyboard" but I'm unable to find framework bundle.

var bundle = NSBundle.FromClass(
     new ObjCRuntime.Class(typeof(FromFrameworkViewController)))

When i try to find correct bundle using FromClass and passing class from framework it still returns me main bundle. Creating Bundle from framework identifier returns null.

How should it be done? Do Xamarin.iOS allows us to reference Framework Bundle and how to find it? Or should my binding library provides something that I am missing.

For anyone that looks for an answer - right now it's unresolved Xamarin bug.

https://bugzilla.xamarin.com/show_bug.cgi?id=12851

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM