I have an onappearing method which doesn’t fire when page is popped in Xamarin iOS but works fine in Xamarin Android. Could anyone please help me with this. Thank you.
Page 1 (Tabbed Page)
protected override void OnAppearing()
{
base.OnAppearing();
if (CVItems.SelectedItem != null)
CVItems.SelectedItem = null;
}
private async void CVItems_SelectionChangedAsync(object sender, SelectionChangedEventArgs e)
{
var selecteditem = e.CurrentSelection.First() as Item;
var detailPage = new AdPage(selecteditem);
detailPage.BindingContext = selecteditem;
await Navigation.PushModalAsync(detailPage);
}
Page 2 (Modal Page)
private async void poppage_Tapped(object sender, EventArgs e)
{
await Navigation.PopModalAsync();
}
When an item in collection view is tapped, modal page opens up and then when I pop back to the tabbed page, the onappearing() method is not triggered.
Please could you show an example of you code?
You could try the following try catch to view any error that is happening: