You could scan the ViewControllers stack looking for your instance.
_rootDVC.ViewDisappearing += delegate {
foreach (UIViewController ctrl in _navController.ViewControllers)
{
if (ctrl == _rootDVC)
{
Console.WriteLine ("Did not pop");
return;
}
}
Console.WriteLine ("Did pop");
};
-bill
On Sun, May 13, 2012 at 3:52 PM, Michael Hutchinson
<[email protected]> wrote:
> Forwarding this to the MonoTouch list.
>
> ---------- Forwarded message ----------
> From: Guido Van Hoecke <[email protected]>
> Date: 11 May 2012 16:16
> Subject: [MonoDevelop] Differentiate ViewDisappearing events
> To: [email protected]
>
>
> Hi,
>
> Say one has a simple DialogViewController with e.g. a DateTimeElement.
>
> The Dvc has been pushed upon the stack, so it has a navigate back
> button.
>
> Hitting the Back button will throw the ViewDisappearing event.
> Hitting the DateTimeElement will throw the same event.
>
> Is there a simple way to differentiate amongst both events, to know
> whether the controller is actually popped off the stack or not?
>
> Thanks in advance,
>
>
> Guido
>
> P.S.: Geef een seintje als U geen "hh" mails wilt ontvangen
>
> --
> Know thyself. If you need help, call the C.I.A.
>
> http://vanhoecke.org ... and go2 places!
> _______________________________________________
> Monodevelop-list mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monodevelop-list
>
>
> --
> Michael Hutchinson
> http://mjhutchinson.com
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch