Skip to content

Commit

Permalink
Bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasudev committed Feb 9, 2022
1 parent b3ac660 commit c55847e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions AnimateTextExample/Shared/TapAnimateTextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,10 @@ struct TapAnimateTextView<E: ATTextAnimateEffect>: View {
.opacity(0.3)
.disabled(true)
}
.transition(.opacity)
.animation(.easeInOut(duration: 0.24), value: text)
}
}
.padding()
.padding(.bottom, 50)
.animation(.easeInOut, value: text)
Spacer()
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/AnimateText/AnimateText.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ public struct AnimateText<E: ATTextAnimateEffect>: View {
}
}
.onChange(of: text) { _ in
self.isChanged = true
withAnimation {
value = 0
getText(text)
toggle.toggle()
}
self.isChanged = true
DispatchQueue.main.async {
value = 1
}
Expand Down

0 comments on commit c55847e

Please sign in to comment.