Skip to content

Commit

Permalink
Merge pull request suzuki-0000#5 from iAugux/master
Browse files Browse the repository at this point in the history
Fixed time error of counter
  • Loading branch information
suzuki-0000 committed Mar 29, 2016
2 parents 90026dc + 09449c4 commit 7bc7122
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CountdownLabel/CountdownLabel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ public class CountdownLabel: LTMorphingLabel {
// MARK: - Public
public extension CountdownLabel {
func start(completion: ( () -> () )? = nil) {
if !isPaused {
// current date should be setted at the time of the counter's starting, or the time will be wrong (just a few seconds) after the first time of pausing.
currentDate = NSDate()
}

// pause status check
updatePauseStatusIfNeeded()

Expand Down

0 comments on commit 7bc7122

Please sign in to comment.