I got the default iOS Master-Detail project (using Swift) from Xocde 6 beta 3. 
Deployment target 7.1

There is a UISplitViewController which has an array of 2 
UINavigationControllers, both have each one UIViewController: the first has 
MasterViewController, the second one has DetailViewController.

UISplitViewController:
        UINavigationController-1        → [MasterViewController]
        UINavigationController-2        → [DetailViewController]

I added this to DetailViewController:

        init( coder: NSCoder )
        {
                super.init(coder: coder)
                println("\ninit \(self)")       //      seen whenever a 
DetailView is appearing
        }

And I see that when ever there is a segue from Master to Detail this happens:
a new DetailViewController is created and the second UINavigationController in 
UISplitViewController changes and points to the just created 
DetailViewController controller.

UISplitViewController:
        UINavigationController-1        → [MasterViewController]        //      
unchanged
        UINavigationController-2b → [DetailViewController-b]    //      both 
changing at every segue

Is this expected behaviour?

Cannot be: in didFinishLaunchingWithOptions the UISplitViewController gets as 
delegate the first ever DetailViewController, which subsequently is never used.

Also after using the Back button (top left of Detail View) once, there never 
will be such a button to be used.
Probably result of current DetailViewController NOT being delegate of 
UISplitViewController.

How to fix this (meaning: the segue should reuse the already existing stuff in 
UISplitViewController instead creating new things) ?

Gerriet.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to