[英]Xamarin.Forms.Navigation.PopAsync() Does Not Pop Page
In Xamarin.Forms, when we use Navigation.PopAsync()
, the page does not pop in iOS. 在Xamarin.Forms中,当我们使用
Navigation.PopAsync()
,页面不会在iOS中弹出。
After PopAsync()
the same page remains. 在
PopAsync()
,相同的页面仍然存在。
If you pushed the page onto the Navigation Stack using Navigation.PushAsync()
, use Navigation.PopAsync()
to pop the page off of the Navigation Stack. 如果您使用
Navigation.PushAsync()
将页面推送到导航堆栈,请使用Navigation.PopAsync()
将页面弹出导航堆栈。
If you pushed the page on to the Navigation Stack using Navigation.PushModalAsync()
, use Navigation.PopModalAsync()
to pop the page off of the Navigation Stack. 如果您使用
Navigation.PushModalAsync()
将页面推送到导航堆栈,请使用Navigation.PopModalAsync()
将页面弹出导航堆栈。
All UI updates must be done on the main thread. 所有UI更新必须在主线程上完成。 To ensure that this request is happening on the main thread, use
BeginInvokeOnMainThread
: 要确保在主线程上发生此请求,请使用
BeginInvokeOnMainThread
:
Device.BeginInvokeOnMainThread(async () => await Navigation.PopAsync());
or 要么
Device.BeginInvokeOnMainThread(async () => await Navigation.PopModalAsync());
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.