Skip to content

Commit

Permalink
Add barSidePadding
Browse files Browse the repository at this point in the history
  • Loading branch information
sereivoanyong committed Jul 2, 2021
1 parent 2c4e018 commit 0a37f3f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Sources/RangeSeekSlider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,13 @@ import UIKit
}
}

/// Set padding on left and right side of slider line (default 16.0)
@IBInspectable open var barSidePadding: CGFloat = 16.0 {
didSet {
updateLabelPositions()
}
}

/// The label displayed in accessibility mode for minimum value handler. If not set, the default is empty String.
@IBInspectable open var minLabelAccessibilityLabel: String?

Expand Down Expand Up @@ -470,7 +477,6 @@ import UIKit
}

private func updateLineHeight() {
let barSidePadding: CGFloat = 16.0
let yMiddle: CGFloat = (frame.height - lineHeight) / 2.0
let lineLeftSide: CGPoint = CGPoint(x: barSidePadding, y: yMiddle)
let lineRightSide: CGPoint = CGPoint(x: frame.width - barSidePadding,
Expand Down

0 comments on commit 0a37f3f

Please sign in to comment.