Skip to content

Commit

Permalink
Merge pull request #49 from timdolenko/bug/iOS-17-CPU-Issue
Browse files Browse the repository at this point in the history
iOS 17 Animation fixed
  • Loading branch information
CSolanaM authored Jan 10, 2024
2 parents 0fe0817 + af650a8 commit 2216897
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/SkeletonUI/Modifiers/SkeletonModifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ public struct SkeletonModifier: ViewModifier {

public func body(content: Content) -> some View {
content
.modifier(SkeletonAnimatableModifier(CGFloat(integerLiteral: Int(truncating: animate as NSNumber)), appearance).animation(animation.type))
.modifier(SkeletonAnimatableModifier(animate ? 1 : 0, appearance))
.clipShape(SkeletonShape(shape))
.animation(animation.type, value: animate)
.onAppear { animate.toggle() }
}
}

0 comments on commit 2216897

Please sign in to comment.