Skip to content

Commit ccbfb27

Browse files
committed
Set slider as needing a redraw when layout changes; e.g. when the device is rotated (if constraints cause the element's dimensions to change)
1 parent 5514679 commit ccbfb27

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

TactileSlider/Classes/TactileSlider.swift

+5
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,11 @@ import UIKit
285285

286286
// MARK: - Graphics
287287

288+
override open func layoutSubviews() {
289+
super.layoutSubviews()
290+
self.setNeedsDisplay()
291+
}
292+
288293
override open func draw(_ rect: CGRect) {
289294
super.draw(rect)
290295
updateLayerFrames()

0 commit comments

Comments
 (0)