On Thu, Apr 16, 2015, at 09:46 AM, Roland King wrote: > > > On 16 Apr 2015, at 22:20, Gerriet M. Denkmann <[email protected]> wrote: > > > >> > >> On 16 Apr 2015, at 13:41, Roland King <[email protected]> wrote: > >> > >> > >>> > >>> 5. Run > >>> > >>> iPhone - tapping on "Do & Back" prints: > >>> 2015-04-16 12:16:52.799 Dummi[28069:20737983] -[MasterViewController > >>> doSomethingAndBackToMaster:] did something with "2015-04-16 05:16:49 > >>> +0000", will do: [<UIStoryboardSegue: 0x79f386e0> perform] > >>> > >>> iPad - tapping on "Do & Back" prints: > >>> nothing. > >>> > >> > >> > >> What did you expect it to do on the iPad? > > > > I expected it to print and then to ignore the segue, because as you say, it > > makes no sense on iPad. > > Ah no - it would only have printed if the segue was run/actioned/whatever > you do to a segue. That would only happen if the class implementing the > exit segue had been located. Exit segue resolution is something a bit > like the responder chain. In this case the class which implemented the > segue isn’t in the chain of UIViewControllers on the iPad so it’s not > found so it’s not run.
This is more or less the correct explanation, but it's tricky, and arguably not the desired behavior. If Gerriet had implemented the unwind selector on a subclass of the navigation controller rather than on the navigation controller's root view controller, then the split view controller would have found it when the segue runtime sent it -viewControllerForUnwindSegueAction:. But that method only looks directly at the receiver's children. > > Exit segues are documented however I’ve never found the documentation > terribly clear, it does however tell you what methods are called in the > search for an exit segue and how the search goes up the chain. > The most comprehensive documentation for how unwind segues work is currently found in TT2298: Using Unwind Segues <https://developer.apple.com/library/ios/technotes/tn2298/_index.html>. > In this case I’d say this ‘works as designed’, the iPad view controller > hierarchy is just different from that on the iPhone and the exit segue > doesn’t fire. Yep. But, as always, we appreciate bugs that explain why the current design doesn't work for a particular use case. --Kyle Sluder _______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
