Skip to content

Commit

Permalink
Merge pull request #22 from cats-oss/add-fillmode-to-param
Browse files Browse the repository at this point in the history
Add fillmode forwards to parameter
  • Loading branch information
funzin authored Apr 17, 2019
2 parents a3d8587 + c18a78c commit 5e052a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sica/Source/Animator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,14 @@ public final class Animator {
layer?.removeAnimation(forKey: key)
}

public func run(type: AnimationPlayType, isRemovedOnCompletion: Bool = false, completion: (() -> Void)? = nil) {
public func run(type: AnimationPlayType, fillMode: FillMode = FillMode.forwards, isRemovedOnCompletion: Bool = false, completion: (() -> Void)? = nil) {

if case .sequence = type {
calculateBeginTime()
}
group.animations = animations
group.duration = totalDuration(type: type)
group.fillMode = FillMode.forwards.rawValue
group.fillMode = fillMode.rawValue
group.isRemovedOnCompletion = isRemovedOnCompletion

if let completion = completion {
Expand Down

0 comments on commit 5e052a9

Please sign in to comment.