示例#1
0
        // DismissModalViewControllerAnimated can be called on on any controller in the hierarchy
        // note: if you dismiss something that is not in the hierarchy then you remove references to everything :(
        static void PopModal(UIViewController controller)
        {
            // handle the dismiss from the presenter
            // https://bugzilla.xamarin.com/show_bug.cgi?id=3489#c2
            if (modal == null || (modal.Count == 0))
                return;

            UIViewController pop = modal.Pop ();
            while (pop != controller && (modal.Count > 0)) {
                pop = modal.Pop ();
            }
        }
示例#2
0
 static void PushModal(UIViewController controller)
 {
     if (modal == null)
         modal = new Stack<UIViewController> ();
     modal.Push (controller);
 }