Patrick Goode
Patrick Goode

Reputation: 1452

Xamarin Forms PopModalAsync()

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

  await Navigation.PushModalAsync(new mypage());

When I call

  await Navigation.PopModalAsync();

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

Upvotes: 2

Views: 1044

Answers (2)

Sayo Komolafe
Sayo Komolafe

Reputation: 1006

You can also try this

await Navigation.PushAsync(new mypage());

and then,

await Navigation.PopAsync();

Upvotes: 1

qubuss
qubuss

Reputation: 268

Maybe try pushing in this way:

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

And then call:

 Navigation.PopAsync();

Upvotes: 2

Related Questions