xamarin - 当 Shell.Current.Navigation.PopAsync() 返回页面时,对于 iOS 会触发 OnAppearing,但对于 Android 则不会

标签 xamarin xamarin.forms xamarin.shell

我使用以下命令打开新页面:

OpenPageCmd = new Command<string>(async (route) => await Shell.Current.GoToAsync(route));

我正在使用此命令返回页面:

Shell.Current.Navigation.PopAsync();

在 iOS 中调用了 OnAppearing ,但在 XF 4.1.0.709244 的 Android 中未调用 OnAppearing

请注意,我没有使用最新的 XF,因为这会导致其他已知问题,导致应用程序无法正常工作。

有谁知道如何解决这个问题。这对我来说是一个严重的问题,并且阻碍了应用程序的发布。

最佳答案

我认为他们直到 XF 4.2 才实现 shell 生命周期

关于xamarin - 当 Shell.Current.Navigation.PopAsync() 返回页面时,对于 iOS 会触发 OnAppearing,但对于 Android 则不会,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57793362/

相关文章:

ios - Xamarin Forms Shell 覆盖 iOS (iPad) 上的顶级信息行

xamarin.forms - 在 Xamarin.Forms shell 菜单中设置默认页面

php - 从 MySQL 查询中获取值

ios - 添加观察者时 AVPlayer 崩溃

c# - Xamarin Connectivity 插件总是抛出 NotImplementedException

c# - 如何在 xamarin.forms 中读取图像源或图像名称?

xamarin - 如何根据view.Width动态自动设置FontSize?

c# - Xamarin.Forms App.xaml MergedDictionaries - 静态资源查找未检测样式

google-maps - 如何在 Xamarin Forms(Android 和 iOS)中实现 Google map ?