Realized my storyboard was missing the title= tag.
Using an iOS storyboard and viewcontroller in Maui
Phunction
261
Reputation points
I am in the process of porting my xamarin.ios project to maui.
Unfortuanately I have a storyboard and viewcontroller I cannot replicate in maui. (Dropbox)
Is there a way I can use that part in my maui project?
I copied the files to Platforms/iOS but not sure how to actually launch them from a button on the maui side.
It consists of a storyboard file and amd associated UIViewController
I tried this, but I get an exception "Could not find a storyboard named Dropbox in bundle NSBundle"
UIStoryboard board = UIStoryboard.FromName("Dropbox", null); << EXCEPTION HERE
UIViewController ctrl = (UIViewController)board.InstantiateViewController("CDropBoxVC");
// Get the current Navigation Controller
var windowScene = UIApplication.SharedApplication .ConnectedScenes
.ToArray()
.FirstOrDefault(s => s.ActivationState == UISceneActivationState.ForegroundActive) as UIWindowScene;
if (windowScene != null)
{
var window = windowScene.Windows.FirstOrDefault();
if (window != null)
{
var navigationController = window.RootViewController as UINavigationController;
if (navigationController != null)
{
navigationController.PushViewController(ctrl, true);
}
else
{
window.RootViewController.PresentViewController(ctrl, true, null);
}
}
}