3

This is my part of my subclass of UIPresentationController:

override func presentationTransitionWillBegin() {

    if let containerView = containerView {
        dimmingView.frame = containerView.bounds
        dimmingView.backgroundColor = UIColor.yellowColor()
        containerView.insertSubview(dimmingView, atIndex: 0)

        presentedViewController.transitionCoordinator()?.animateAlongsideTransition({ context in

            self.dimmingView.backgroundColor = UIColor.greenColor() //line A

            }, completion: nil)
    }
}

The problem is, that I cannot see the yellow even for a millisecond. Why? What does it mean alongside transition? What transition? My transition duration is set within UIViewControllerAnimatedTransitioning to 5 seconds.

If I remove my line A, then I can see just yellow color and it is ok. Why this animation (from yellow to green) do not take my 5 seconds?

Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358

0 Answers0