• 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: unwind segue on navigation pop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unwind segue on navigation pop


  • Subject: Re: unwind segue on navigation pop
  • From: Roland King <email@hidden>
  • Date: Sat, 14 May 2016 09:38:23 +0800

> On 13 May 2016, at 23:03, Kyle Sluder <email@hidden> wrote:
>
> On Thu, May 12, 2016, at 09:48 PM, Roland King wrote:
>> I’m making more use of unwind segues to try and get to the point I have
>> ‘go forward’ and ‘go backward’ code in one place in the same class. So
>> during prepareForSegue I set some stuff up, during my unwind segue method
>> I tear it down again. Don’t use it for everything, but for some complex
>> presentations it’s been quite useful.
>>
>> I’ve just changed a piece of navigation to use a standard nav controller,
>> it used to be a modal presentation but a push makes more sense. So now
>> there’s no custom dismiss button like there used to be, you go back with
>> the normal back button on the nav controller. I can’t find a good way to
>> get that back action to trigger my unwind segue. Can’t seem to do it in
>> IB, I don’t want a custom back button because you lose the chevron (or
>> have to fake it) and all the normal uinav behaviour.
>
> The Back button is not customizable in this fashion. Please file an
> enhancement request at https://bugreport.apple.com.
>
> --Kyle Sluder
>

Yes I know it’s not customizable - but I was looking for a shorter term solution than an enhancement request, because I actually need to write the app.

Is there a way to locate the exit segue method in a similar way to how exit segues themselves would find it so I can call it directly. In this case the exit segue is implemented by a VC pushed onto a nav stack below the one exiting.

triggering the exit segue from viewWillDissapear: works but has a very fragile feel to it.
targetForAction:withSender: doesn’t work because the responder chain goes through the nav controller and on upwards, but not through the sibling pushed VCs
targetViewControllerForAction:withSender I hoped would work, but seems to have the same issue, I don’t think the nav controller checks its children VCs

I didn’t really want to rebuild the machinery using allowedChildViewControllersForUnwindingFromSource: etc and hoped there was a pre-existing method to do the resolution.

Looks like I’m using a protocol and revisiting in 2 years.





_______________________________________________

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: 
 >unwind segue on navigation pop (From: Roland King <email@hidden>)
 >Re: unwind segue on navigation pop (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: ARC [was Protecting against "app nap"]
  • Next by Date: Re: Application Activation Problem
  • Previous by thread: Re: unwind segue on navigation pop
  • Next by thread: Application Activation Problem
  • Index(es):
    • Date
    • Thread