London Escorts sunderland escorts 1v1.lol unblocked yohoho 76 https://www.symbaloo.com/mix/yohoho?lang=EN yohoho https://www.symbaloo.com/mix/agariounblockedpvp https://yohoho-io.app/ https://www.symbaloo.com/mix/agariounblockedschool1?lang=EN
4 C
New York
Saturday, November 23, 2024

ios – Recreate high degree web page for a tab every time it’s navigated to in a Maui Shell app


I created a Shell app utilizing Tabs for iOS. Two of the Tabs (Tab1 & Tab2) create pages (Page1 & Page2) that devour loads of reminiscence every. If I click on Tab1 after which Tab2 the app crashes resulting from an excessive amount of reminiscence utilization as a result of Page1 stays alive as Page2 is created. The identical is true if I click on Tab2 then Tab1. The reminiscence utilization of Page1 or Page2 is suitable when solely one in every of them is instantiated however the two collectively causes iOS to evict my app.

The primary time I click on on Tab1, Page1 is instantiated. If Page1 is being displayed and I navigate to the Page2, how can I eliminate Page1 and have it recreated once I click on Tab1? I am very keen to dwell with the additional time required to reinstantiate both Page1 or Page2 every time their respective Tabs are clicked.

I attempted utilizing:

protected override void OnDisappearing()
{
 Shell.Present.Navigation.RemovePage(Shell.Present.Navigation.NavigationStack.ElementAt(0));
}

to take away the primary web page on the NavigationStack as I navigate away from Page1 however this throws a System.ArgumentNullException. The Navigation Stack does have 1 aspect however that aspect is Null. It is not Page1.

Each time I navigate away from Page1, I need the subsequent click on on Tab1 to be handled as if it was the primary click on. Similar with Tab2 & Page2. Any assist can be significantly appreciated!

Related Articles

Social Media Auto Publish Powered By : XYZScripts.com