0

I'm trying to run the NPlus1DaysOfMvvmCross N=24 SplitView tutorial.

It works fine under iphone simulator. The buttons navigate to the red and blue views, however they don't look quite the same as the video (no border).

Under ipad I just get a grey screen after the mvvmcross splash.

The output looks OK and i've verified by debug that it is creating the presenter here:

protected override IMvxTouchViewPresenter CreatePresenter()
{
    if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad)
        return new SplitPresenter(_window);

        return base.CreatePresenter();
}

How can I work out what the issue might be?

Starting iPad Retina simulator 7.1
Launching application
Application launched. PID = 23709
Press enter to terminate the application
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll [External]
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll [External]
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/System.dll [External]
Thread started:  #2
Loaded assembly: /Users/mike/NPlus1DaysOfMvvmCross/N-24-Split/Splitter.Touch/bin/iPhoneSimulator/Debug/SplitterTouch.exe
Loaded assembly: /Users/mike/NPlus1DaysOfMvvmCross/N-24-Split/packages/MvvmCross.HotTuna.CrossCore.3.1.1-beta2/lib/MonoTouch/Cirrious.CrossCore.dll [External]
Loaded assembly: /Users/mike/NPlus1DaysOfMvvmCross/N-24-Split/packages/MvvmCross.HotTuna.MvvmCrossLibraries.3.1.1-beta2/lib/MonoTouch/Cirrious.MvvmCross.Touch.dll [External]
Loaded assembly: /Users/mike/NPlus1DaysOfMvvmCross/N-24-Split/packages/MvvmCross.HotTuna.MvvmCrossLibraries.3.1.1-beta2/lib/MonoTouch/Cirrious.MvvmCross.dll [External]
Loaded assembly: /Users/mike/NPlus1DaysOfMvvmCross/N-24-Split/packages/MvvmCross.HotTuna.CrossCore.3.1.1-beta2/lib/MonoTouch/Cirrious.CrossCore.Touch.dll [External]
Loaded assembly: /Users/mike/NPlus1DaysOfMvvmCross/N-24-Split/packages/MvvmCross.HotTuna.CrossCore.3.1.1-beta2/lib/MonoTouch/Cirrious.MvvmCross.Binding.dll [External]
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/Mono.Dynamic.Interpreter.dll [External]
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll [External]
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/System.Windows.dll [External]
Loaded assembly: /Users/mike/NPlus1DaysOfMvvmCross/N-24-Split/packages/MvvmCross.HotTuna.CrossCore.3.1.1-beta2/lib/MonoTouch/Cirrious.MvvmCross.Localization.dll [External]
Loaded assembly: /Users/mike/NPlus1DaysOfMvvmCross/N-24-Split/packages/MvvmCross.HotTuna.CrossCore.3.1.1-beta2/lib/MonoTouch/Cirrious.MvvmCross.Binding.Touch.dll [External]
Loaded assembly: /Users/mike/NPlus1DaysOfMvvmCross/N-24-Split/Splitter.Core/bin/Debug/Splitter.Core.dll [External]
2014-07-08 15:11:52.913 SplitterTouch[23709:70b] mvx: Diagnostic:   0.00 Setup: PlatformServices start
2014-07-08 15:11:52.928 SplitterTouch[23709:70b] mvx: Diagnostic:   0.04 Setup: MvvmCross settings start
2014-07-08 15:11:52.929 SplitterTouch[23709:70b] mvx: Diagnostic:   0.04 Setup: Singleton Cache start
2014-07-08 15:11:52.930 SplitterTouch[23709:70b] mvx: Diagnostic:   0.04 Setup: Bootstrap actions
2014-07-08 15:11:52.938 SplitterTouch[23709:70b] mvx: Diagnostic:   0.05 Setup: StringToTypeParser start
2014-07-08 15:11:52.940 SplitterTouch[23709:70b] mvx: Diagnostic:   0.05 Setup: ViewModelFramework start
2014-07-08 15:11:52.941 SplitterTouch[23709:70b] mvx: Diagnostic:   0.05 Setup: PluginManagerFramework start
2014-07-08 15:11:52.942 SplitterTouch[23709:70b] mvx: Diagnostic:   0.05 Setup: App start
2014-07-08 15:11:52.960 SplitterTouch[23709:70b] mvx: Diagnostic:   0.07 Setup: ViewModelTypeFinder start
2014-07-08 15:11:52.962 SplitterTouch[23709:70b] mvx: Diagnostic:   0.07 Setup: ViewsContainer start
2014-07-08 15:11:52.963 SplitterTouch[23709:70b] mvx: Diagnostic:   0.07 Setup: ViewDispatcher start
2014-07-08 15:11:52.963 SplitterTouch[23709:70b] mvx: Diagnostic:   0.08 Setup: Views start
2014-07-08 15:11:52.976 SplitterTouch[23709:70b] mvx: Diagnostic:   0.09 Setup: CommandCollectionBuilder start
2014-07-08 15:11:52.977 SplitterTouch[23709:70b] mvx: Diagnostic:   0.09 Setup: NavigationSerializer start
2014-07-08 15:11:52.978 SplitterTouch[23709:70b] mvx: Diagnostic:   0.09 Setup: InpcInterception start
2014-07-08 15:11:52.978 SplitterTouch[23709:70b] mvx: Diagnostic:   0.09 Setup: LastChance start
2014-07-08 15:11:52.999 SplitterTouch[23709:70b] mvx: Diagnostic:   0.11 Setup: Secondary end
2014-07-08 15:11:53.000 SplitterTouch[23709:70b] mvx: Diagnostic:   0.11 Showing ViewModel FirstViewModel
2014-07-08 15:11:53.002 SplitterTouch[23709:70b] TouchNavigation: Diagnostic:   0.11 Navigate requested
Michael Ribbons
  • 1,753
  • 1
  • 16
  • 26

1 Answers1

0

I got it working by making a new SplitViewController with each SplitPresenter.Show() request

    public override void Show(Cirrious.MvvmCross.ViewModels.MvxViewModelRequest request)
    {
        var viewController = (UIViewController)Mvx.Resolve<IMvxTouchViewCreator>().CreateView(request);

        if (request.ViewModelType == typeof(FirstViewModel))
            left = viewController;
        else
            right = viewController;


        _window.RootViewController = new SplitViewController ( left, right );
    }

Full example here: https://github.com/mribbons/NPlus1-N-24-SplitView

I'm not sure if this is Bad(tm).

Michael Ribbons
  • 1,753
  • 1
  • 16
  • 26
  • Stuart Lodge I would like to hear your input on this. Also let me know if you want me to create a PR against the tutorials repo. – Michael Ribbons Jul 08 '14 at 22:36