Just upgraded to the latestest Xamarin iOS build (9.0.1.0) and I am now getting an error whenever I try to update the MainPage property of the application class. This is what my logic looks like:
1. User starts app and isn't auththenticated so MainPage is set to the login form.
MainPage = new LoginView();
2.
- When a user selects a menu item the MainPage is updated to the proper page.
var page = (Page)Activator.CreateInstance(mi.ViewType);
MainPage = new MasterDetailPage()
{
Master = new DrawerContentView() { Title = "Menu" },
Detail = new NavigationPage(page) { BarBackgroundColor = Constants.HeaderBackground, BarTextColor = Color.White },
IsPresented = false,
IsGestureEnabled = false,
};
This approach was working fine until I upgraded to the latest build and still works in Android I only get the error in iOS.
The error I get is:
System.ArgumentNullException: Argument cannot be null.
Parameter name: source
Any thoughts? Should I be taking a different approach?