ios - UIViewControllerContext initalFrameForViewController & finalFrameForViewController show 0 for all values -


I am implementing my own custom UIViewController transition and when I click on the debugger's frame To see the controller output, I get the {{0, 0}, {0}} for both the initial and the final frames. I thought that this method on reference is considered to show the initial frame before the final fracture and infection before the final transition.

Is this going to work?

  - (minus) Prarnbintraktiv Tronnsisn: (ID & lt; UIViewControllerContextTransitioning & gt;) transition Contaks {UIViewController * fromVC = [Transition Content View-View-Controller Foreki: UITransitionContextFromViewControllerKey]; UIViewController * toVC = [Transition Content Visual View Controller Foreiki: UITransitionContextToViewControllerKey]; CGRect initialToFrame = [transitionContext initialFrameForViewController: toVC]; CGRTT Last Topframe = [Transition Consult FinalForForvient Controller: Towisi]; Anselog (@ "initial Tofram:% @, final Tofram:% @", Ansstiingfromsigret (initial Tofram), Ansstiringfromsijiakt (final Tofrem)); }   

Showing debugger: initialToFrame: {{0,}, {0}}, final tofrem: {{0,}, {0}}

Additionally, the debugger is also showing the following warning. Does it contribute to error anyway?

It is frustrating to present view controllers on different view controllers

You should first know that there are about two types of custom changes: Full and non-fullscreen and those who are seeking the last frame for toVC.vew are a non- There is absolutely no sense in the fullscreen transition.

Set in cases where you modalPresentationStyle are not set or it is clearly UIModalPresentationFullScreen (this is the default value) know UIKit That toVC.view will cover the entire screen, so the -finalFrameForViewController: toVC will return the correct frame: the main screen frame. using

modalPresentationStyle = UIModalPresentationCustom you can specify that the transition should be non-fullscreen, that is: toVC.view will be partially covered by < Code> FromVC.view (and the chicken CE fromCV.view will be placed in the hierarchy); Where toVC.view Your decision will be fromVC.view , this is the reason that -finalFrameForViewController: returns CGRectZero .

What is that CGRectZero is telling you: "Hey buddy

For more information see this presentation:

Hope That it would be helpful.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -