Skip to content

Commit

Permalink
Remove old code
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Vorobei committed Feb 9, 2019
1 parent ef6383f commit dce5b8a
Showing 1 changed file with 2 additions and 9 deletions.
Expand Up @@ -25,21 +25,14 @@ final class SPStorkPresentingAnimationController: NSObject, UIViewControllerAnim

func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {

guard let presentedViewController = transitionContext.viewController(forKey: .to) else {
return
}
guard let presentedViewController = transitionContext.viewController(forKey: .to) else { return }

let containerView = transitionContext.containerView
containerView.addSubview(presentedViewController.view)

//presentedViewController.view.frame = CGRect(x: 0, y: containerView.bounds.height, width: containerView.bounds.width, height: containerView.bounds.height)


let finalFrameForPresentedView = transitionContext.finalFrame(for: presentedViewController)

// NEW FRAMING: Testing now. Maybe correct. If remove it lines, init frame of controller will be equal container (not stork)
presentedViewController.view.frame = finalFrameForPresentedView
presentedViewController.view.frame.origin.y = containerView.bounds.height
// END NEW.

UIView.animate(
withDuration: transitionDuration(using: transitionContext),
Expand Down

0 comments on commit dce5b8a

Please sign in to comment.