Monday, 15 April 2013

ios - Handle end of custom transition when not animated? -


I'm using a custom transition in my app.

I have a animateTransition method, which gives me a UIViewControllerContextTransitioning , and I get the code from containerView.backgroundColor to UIColor.blackColor () allows UIView.animate .. block to complete.

Problems occur if I call presentViewController: from animated set to false . There is no animation which means the animateTransition method never calls, and therefore my background is not as black as the purpose.

I was wondering how else can I set the background color of the container view animated without any change in black. By the way, animating does not mean that I do not have to animate it, and removing it on animate does not help matters because it does not even give me the opportunity to black out the container.

You can see it within the controller view, the look of the doldload-method, like this:

< Pre> overdode function viewDidload () {super.viewDidLoad () self.view.backgroundColor = UIColor.blackColor ()}

No comments:

Post a Comment