在MonoCross iOS App中使用SlideOut导航

时间:2012-11-13 20:51:26

标签: ios mono xamarin.ios monocross

Dillon Buchanan在MonoTouch中有一个很棒的example for creating the a left side slide-out导航。

我的问题是我正在使用MonoCross而无法弄清楚如何实现它。以下是Dillon与我FinishedLaunching实施的摘录。

狄龙的:

public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
    window = new UIWindow (UIScreen.MainScreen.Bounds);
    Menu = new SlideoutNavigationController();
    Menu.TopView = new HomeViewController();
    Menu.MenuView = new DummyController();

    window.RootViewController = Menu;
    window.MakeKeyAndVisible ();

    return true;
}

public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
    // create a new window instance based on the screen size
    window = new UIWindow (UIScreen.MainScreen.Bounds);

    MXTouchContainer.Initialize(new eDash.App(), this, window);

    // Add Views
    MXTouchContainer.AddView<List<Location>>(typeof(LocationListView), ViewPerspective.Default);
    MXTouchContainer.AddView<Location>(typeof(LocationView), ViewPerspective.Default);
    MXTouchContainer.AddView<List<Engagements>>(typeof(EngagementsListView), ViewPerspective.Default);


    MXTouchContainer.Navigate(null, MXContainer.Instance.App.NavigateOnLoad);

    UIDevice.CurrentDevice.BeginGeneratingDeviceOrientationNotifications(); 
    UINavigationBar.Appearance.TintColor =UIColor.Black;


    return true;
}

0 个答案:

没有答案