Xamarin表单PopModalAsync() [英] Xamarin Forms PopModalAsync()

查看:320
本文介绍了Xamarin表单PopModalAsync()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在iOS上使用Xamarin Forms,使用

Working with Xamarin Forms, on iOS, pusing a modal using

  await Navigation.PushModalAsync(new mypage());

当我打电话

  await Navigation.PopModalAsync();

从mypage一直弹出回到根目录,而不是我刚才所说的push from.与模态推送页面交互的其他任何地方都没有代码

from mypage it pops all the way back to root instead of where I just called push from. There's no code anywhere else interacting with the modally pushed page

推荐答案

也许尝试以这种方式推送:

Maybe try pushing in this way:

await ((MainPage)App.Current.MainPage).Detail.Navigation.PushAsync(new mypage());

然后致电:

 Navigation.PopAsync();

这篇关于Xamarin表单PopModalAsync()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆