Skip to content

Commit 9ce2ef6

Browse files
committed
Merge branch 'master' of https://github.com/hariseldon78/MarqueeLabel into hariseldon78-master
2 parents 1d1a7ae + 6aa2e27 commit 9ce2ef6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/MarqueeLabel.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ open class MarqueeLabel: UILabel, CAAnimationDelegate {
153153
}
154154
}
155155

156+
@IBInspectable public var forceScrolling: Bool = false
157+
156158
/**
157159
A boolean property that sets whether the `MarqueeLabel` should only begin a scroll when tapped.
158160

@@ -780,7 +782,7 @@ open class MarqueeLabel: UILabel, CAAnimationDelegate {
780782
}
781783

782784
let animationHasDuration = speed.value > 0.0
783-
return (!labelize && labelTooLarge && animationHasDuration)
785+
return (!labelize && (forceScrolling || labelTooLarge) && animationHasDuration)
784786
}
785787

786788
private func labelReadyForScroll() -> Bool {

0 commit comments

Comments
 (0)