Last active
December 18, 2015 03:39
-
-
Save deapsquatter/5719733 to your computer and use it in GitHub Desktop.
An iPhone presenter for use with MvxTabBarViewController (MvvmCross)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class IPhoneViewPresenter : MvxModalNavSupportTouchViewPresenter | |
{ | |
public IPhoneViewPresenter (UIApplicationDelegate applicationDelegate, UIWindow window) | |
:base(applicationDelegate, window) | |
{ | |
} | |
HomeView homeView; | |
protected override UIViewController CurrentTopViewController | |
{ | |
get { return MasterNavigationController.TopViewController; } | |
} | |
public override UINavigationController MasterNavigationController | |
{ | |
get{ | |
var navController = homeView.ViewControllers [homeView.SelectedIndex]; | |
return (UINavigationController)navController; | |
} | |
} | |
public override void Show (Cirrious.MvvmCross.Touch.Views.IMvxTouchView view) | |
{ | |
if (homeView != null) | |
base.Show (view); | |
else{ | |
homeView = view as HomeView; | |
base.SetWindowRootViewController (homeView); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment