Skip to content

Commit

Permalink
Add a main thread check
Browse files Browse the repository at this point in the history
  • Loading branch information
buba447 committed Oct 10, 2019
1 parent 7d47ec8 commit c83c15b
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ class AnimationContainer: CALayer {
}

public override func display() {
guard Thread.isMainThread else { return }
var newFrame: CGFloat = self.presentation()?.currentFrame ?? self.currentFrame
if respectAnimationFrameRate {
newFrame = floor(newFrame)
Expand Down

0 comments on commit c83c15b

Please sign in to comment.