public class myApp: Xamarin.Forms.Application
{
public myApp (Xamarin.Forms.ContentPage pg)
{
MainPage = pg;
}
}
In AppDelegate.cs
var pg = new page_AgentLogin (); // a simple ContentPage
var mainApp = new myApp(pg);
GlobalVar.mainApp = mainApp; // Static Class, Public Static Xamarin.Forms.Application mainApp
LoadApplication(mainApp);
When I trying to replace the MainPage in page_AgentLogin,
var pg = new page_AgentClientList(); // a simple TableView
GlobalVar.mainApp.MainPage = pg;
Error - Could not load type 'UIKit.UIView_UITextField' from assembly 'Xamarin.Forms.Platform.iOS'.
Anyone know what cause this error? When I run the similar code in Android don't have any error.
Or any other better ways to do it? Just want to replace the MainPage of the application so that I can start over again the entire app (it is like reload the app)
Thanks for your time reading this.