Skip to content

Commit

Permalink
Merge pull request #36 from luckytianyiyan/hide_bubble
Browse files Browse the repository at this point in the history
Fixed: bubble is displayed in other custom transition animation.
  • Loading branch information
andreamazz authored Apr 26, 2017
2 parents 4477249 + 920d401 commit 1696d5f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/BubbleTransition.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ extension BubbleTransition: UIViewControllerAnimatedTransitioning {
presentedControllerView.center = originalCenter
}, completion: { (_) in
transitionContext.completeTransition(true)

self.bubble.isHidden = true
fromViewController?.endAppearanceTransition()
toViewController?.endAppearanceTransition()
})
Expand All @@ -141,6 +141,7 @@ extension BubbleTransition: UIViewControllerAnimatedTransitioning {
bubble.frame = frameForBubble(originalCenter, size: originalSize, start: startingPoint)
bubble.layer.cornerRadius = bubble.frame.size.height / 2
bubble.center = startingPoint
bubble.isHidden = false

UIView.animate(withDuration: duration, animations: {
self.bubble.transform = CGAffineTransform(scaleX: 0.001, y: 0.001)
Expand Down

0 comments on commit 1696d5f

Please sign in to comment.