• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Master - Detail: How to get back?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Master - Detail: How to get back?


  • Subject: Re: Master - Detail: How to get back?
  • From: Kyle Sluder <email@hidden>
  • Date: Thu, 16 Apr 2015 11:47:28 -0500

On Thu, Apr 16, 2015, at 09:46 AM, Roland King wrote:
>
> > On 16 Apr 2015, at 22:20, Gerriet M. Denkmann <email@hidden> wrote:
> >
> >>
> >> On 16 Apr 2015, at 13:41, Roland King <email@hidden> 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@hidden)

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:

This email sent to email@hidden


References: 
 >Re: Master - Detail: How to get back? (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Master - Detail: How to get back? (From: Roland King <email@hidden>)
 >Re: Master - Detail: How to get back? (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Master - Detail: How to get back? (From: Roland King <email@hidden>)

  • Prev by Date: Re: Master - Detail: How to get back?
  • Next by Date: Re: layout method not getting called on Content View
  • Previous by thread: Re: Master - Detail: How to get back?
  • Next by thread: Re: Master - Detail: How to get back?
  • Index(es):
    • Date
    • Thread