Skip to content

Commit

Permalink
Merge pull request Yalantis#171 from Yalantis/feature/wrong_frame_on_…
Browse files Browse the repository at this point in the history
…suspending

Fixed top card frame issue on suspending of application.
  • Loading branch information
AEugene committed Jun 30, 2016
2 parents 2b2e7b5 + 4867bb0 commit 8dd0d52
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -212,7 +212,6 @@ public class DraggableCardView: UIView, UIGestureRecognizerDelegate {
layer.rasterizationScale = UIScreen.mainScreen().scale
layer.shouldRasterize = true

break
case .Changed:
let rotationStrength = min(dragDistance.x / CGRectGetWidth(frame), rotationMax)
let rotationAngle = animationDirectionY * defaultRotationAngle * rotationStrength
Expand All @@ -232,13 +231,14 @@ public class DraggableCardView: UIView, UIGestureRecognizerDelegate {
delegate?.card(self, wasDraggedWithFinishPercentage: min(fabs(100 * percentage), 100), inDirection: dragDirection)
}

break
case .Ended:
swipeMadeAction()

layer.shouldRasterize = false
default :
break

default:
layer.shouldRasterize = false
resetViewPositionAndTransformations()
}
}

Expand Down

0 comments on commit 8dd0d52

Please sign in to comment.