• 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: Custom UIViewController transitions with segues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom UIViewController transitions with segues


  • Subject: Re: Custom UIViewController transitions with segues
  • From: Rick Mann <email@hidden>
  • Date: Thu, 31 Dec 2015 02:39:55 -0800

Yes, thank you; that seems to do the trick. Bit annoying, since it's harder to manage the UINavigationControllerDelegate, but this seems to work. Thanks!

> On Dec 30, 2015, at 19:24 , Sixten Otto <email@hidden> wrote:
>
> Are you maybe looking for the UINavigationControllerDelegate method that
> lets you provide an animation controller for the push? That appears to be
> the way one hooks into the operation of the navigation controller in order
> to override the default animations.
>
> https://developer.apple.com/library/ios/documentation/UIKit/Reference/UINavigationControllerDelegate_Protocol/#//apple_ref/occ/intfm/UINavigationControllerDelegate/navigationController:animationControllerForOperation:fromViewController:toViewController
> :
>
>
> On Wed, Dec 30, 2015 at 7:48 PM, Rick Mann <email@hidden> wrote:
>
>>
>>> On Dec 30, 2015, at 18:20 , Rick Mann <email@hidden> wrote:
>>>
>>>
>>>> On Dec 30, 2015, at 18:14 , Roland King <email@hidden> wrote:
>>>>
>>>>
>>>>> On 31 Dec 2015, at 09:12, Rick Mann <email@hidden> wrote:
>>>>>
>>>>> I have a UICollectionView in a UINavigationController, and I'd like to
>> customize the transition from one to the next on push. So I set up the
>> first VC as UIViewControllerTransitioningDelegate, and in
>> prepareForSegue(_:sender:) set the destination VC's transitioningDelegate
>> to self.
>>>>>
>>>>> But my delegate methods never get called. The docs say to set
>> modalPresentationStyle to .Custom, but that has no effect (also, it's a bit
>> weird since this is not technically a modal presentation, is it?).
>>>>>
>>>>> Search for solutions online turns up only custom segues, which is not
>> really what I want.
>>>>>
>>>>> Is it even possible to do this with segues? What am I missing?
>>>>>
>>>>> TIA,
>>>>
>>>> My thought here is that push != present, ie
>> pushViewController(_:animated) doesn’t do the same thing as
>> presentViewController(_:animated:completion) and that push calls the former
>> and other modes call the latter. I dunno what I’d try, the whole
>> UIViewController custom transitioning thing confuses the bananas out of me
>> and I never found the WWDC videos on them to be as helpful as I wished.
>> Perhaps change the push to a present to get it on the screen, then when
>> you’re done with the transition, call pushViewController( vc, animated :
>> false ) to fix up the nav stack. That will probably look really ugly as the
>> nav bar will likely just snap to the new content.
>>>>
>>>> There’s probably 18 other ways to do it. I’d bung some hooks into any
>> methods I could find which run early in the viewcontroller presentation
>> lifecycle and see if there’s a transition coordinator or animation
>> coordinator or whatever objects transitions create which I could hook into
>> and animate alongside.
>>>>
>>>> In general .. having fiddled with custom transitions when the were new
>> and shiny .. I don’t bother with them any more.
>>>
>>> It seems to be a common ocurrence that Apple introduces a "helpful" new
>> way to do things that aren't fully integrated with existing "new" (and
>> definitely not deprecated. e.g. segues) ways of doing things, and the
>> documentation and examples are lacking. Bruce Nilo's 2013 presentation on
>> the subject was particularly lacking in information.
>>>
>>> Having said that, I found this sample code (which did not turn up when
>> searching the sample code for "transition"), which hopefully works. My
>> biggest beef at this point is that the segue *must* be a modal presentation
>> segue (in fact, it seems all custom transitions are for modal presentation
>> only), which seems like a silly limitation, and is not well-documented.
>>>
>>>
>> https://developer.apple.com/library/ios/samplecode/SegueCatalog/Introduction/Intro.html
>>>
>>> You're looking for the "Modal" button in that app, which has a custom
>> segue that uses the transition stuff.
>>
>> Welp, that doesn't work in the push transition. It hides the
>> UINavigationBar. The sample code shows it as a modal transition that takes
>> over the screen, but I want to do a push transition.
>>
>> Thing is, it doesn't seem that any of the transition stuff works properly
>> if you make it anything other than a modal (i.e. not a show/push).
>>
>> Goddammit, Apple.
>>
>> --
>> Rick Mann
>> email@hidden
>>
>>
>>
>> _______________________________________________
>>
>> 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
> _______________________________________________
>
> 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


--
Rick Mann
email@hidden



_______________________________________________

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: 
 >Custom UIViewController transitions with segues (From: Rick Mann <email@hidden>)
 >Re: Custom UIViewController transitions with segues (From: Roland King <email@hidden>)
 >Re: Custom UIViewController transitions with segues (From: Rick Mann <email@hidden>)
 >Re: Custom UIViewController transitions with segues (From: Rick Mann <email@hidden>)
 >Re: Custom UIViewController transitions with segues (From: Sixten Otto <email@hidden>)

  • Prev by Date: Getting key data out of the keychain
  • Next by Date: Collection view loses selection between segue and push
  • Previous by thread: Re: Custom UIViewController transitions with segues
  • Next by thread: Getting key data out of the keychain
  • Index(es):
    • Date
    • Thread