4

Dillon Buchanan 有一个很好的示例,用于在 MonoTouch中创建左侧滑出式导航。

我的问题是我正在使用 MonoCross 并且无法弄清楚如何实现它。下面是 Dillon's vs my FinishedLaunchingimplementation 的片段。

狄龙:

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;
}
4

0 回答 0