Skip to content

Commit

Permalink
Fix Swift 3.1 deprecation (fixes cbpowell#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbpowell committed Apr 12, 2017
1 parent 87e496b commit ac07941
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Swift/MarqueeLabel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ open class MarqueeLabel: UILabel, CAAnimationDelegate {
}

// Check if the label string fits
let labelTooLarge = (sublabelSize().width + leadingBuffer) > self.bounds.size.width + CGFloat(FLT_EPSILON)
let labelTooLarge = (sublabelSize().width + leadingBuffer) > self.bounds.size.width + CGFloat.ulpOfOne
let animationHasDuration = speed.value > 0.0
return (!labelize && labelTooLarge && animationHasDuration)
}
Expand Down

0 comments on commit ac07941

Please sign in to comment.