I don't want to use storyboard with my Xamarin.iOS app, so I did the following:
1- Deleted the storyboard files.
2- Updated the plist.info file Application > Main Interface to have no value.
3- Added the following code to the AppDelegate
file.
[Export ("application:didFinishLaunchingWithOptions:")]
public bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)
{
// create a new window instance based on the screen size
Window = new UIWindow(UIScreen.MainScreen.Bounds);
var controller = new UIViewController();
controller.View.BackgroundColor = UIColor.LightGray;
controller.Title = "My Controller";
var navController = new UINavigationController(controller);
Window.RootViewController = navController;
// make the window visible
Window.MakeKeyAndVisible();
return true;
}
But after doing this I received a black screen on the simulator after the launch screen finishes. This happens even with brand new projects. I have uploaded a sample new project with these steps and issue here.
I am using Visual Studio 2019 - Xamarion.iOS 11.8.3 - XCode 11.3.
I was using Visual Studio 2015 in the recent past with no problem, and I think that this issue happened only with Visual Studio 2019. Unfortunately, currently I don't have a Visual Studio 2015 to experiment with.