I'm currently using the API provided to define custom controller transition. I read the documentation provided by Apple, see the videos on WWDC and found a lots of blogs speaking about it. I have some questions on how to use those API :
- The container view on
animateTransition:
: in the majority of example code I found and in the WWDC 218 named "Custom Transitions using View controllers", only the view of the "toViewController" is added to thecontainerView
. But in some others example and in the video "Architecting Modern iOS Apps", the showed code adds both the "toViewController" and "fromViewController" to thecontainerView
. When should we deal with both and when with only one ? Is it the same for both dismissing and presenting ? - The
initialFrameForViewController:
andfinalFrameForViewController:
from theUIViewControllerContextTransitioning
context: The WWDC 218 video told us it is very important to rely on those methods to retrieve the frames for the controllers' views. But in a lot of examples, the are not used at all. I try to used then in a custom animation, but the frame provided could be located outside the screen. How are the frames determined by those methods ? When those methods should be used ? Is it specified in the documentation ? viewForKey:
in iOS8 : should we use this method instead ofviewControllerForKey:
since iOS 8 ?- Do have the
modalPresentationStyle
incident on the view hierarchy during a custom Animation Transition ? On the slides provided here : http://es.slideshare.net/Split82/custom-uiviewcontroller-transitions, this seems to have an incidence on initial and final frame. Is it documented somewhere ?