Skip to content

Commit

Permalink
Changed the animation default time to 0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
nickpolychronakis committed Jul 1, 2020
1 parent d14334a commit 5a9356c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/FlipAnimation/FlipAnimation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ extension View {
/// - frontSideVisible: True if the front side of the view is visible
/// - duration: The duration we want the animation to take place. Default 1.0 sec
/// - Returns: It returns the same view with some modifiers attached
public func flip(frontSideVisible: Bool, duration: Double = 1.0) -> some View {
public func flip(frontSideVisible: Bool, duration: Double = 0.5) -> some View {
return self
.animation(Animation.linear(duration: 0.01).delay(duration/2.0), value: frontSideVisible)
.rotation3DEffect(Angle(degrees: frontSideVisible ? 0.0 : 180), axis: (x: 0, y: 1, z: 0))
Expand Down

0 comments on commit 5a9356c

Please sign in to comment.