2 Commits

Author SHA1 Message Date
Jalal Ouraigua 1490573852 Fix Slide's value rounding issue 2018-12-22 19:21:05 +00:00
Jalal Ouraigua 68f31bfa1f Remove isNegative. No longer needed 2018-12-22 05:49:20 +00:00
6 changed files with 7 additions and 17 deletions
+1 -1
View File
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.0.1</string>
<string>2.0.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.0.1</string>
<string>2.0.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.0.1</string>
<string>2.0.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.0.1</string>
<string>2.0.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
+1 -1
View File
@@ -8,7 +8,7 @@
Pod::Spec.new do |s|
s.name = 'JOCircularSlider'
s.version = '2.0.1'
s.version = '2.0.2'
s.summary = 'A highly customisable and reusable iOS circular slider.'
# This description is used to generate tags and improve search results.
+2 -12
View File
@@ -261,11 +261,6 @@ open class CircularSlider: UIControl {
set { renderer.isClockwise = newValue }
}
@IBInspectable open var isNegative: Bool {
get { return renderer.isNegative }
set { renderer.isNegative = newValue }
}
@IBInspectable open var labelDecimalPlaces: Int = 0
// MARK: - Private Properties
@@ -362,11 +357,6 @@ class Renderer {
maxiDotView.isClockwise = isClockwise
}
}
fileprivate var isNegative: Bool = false {
didSet {
}
}
fileprivate var textFieldIsHidden: Bool = false
fileprivate var fontSizeMultiplier: CGFloat = 0.5
@@ -464,7 +454,7 @@ private extension Renderer {
textField.layer.cornerRadius = 3
textField.textAlignment = .center
textField.text = ""
textField.keyboardType = .numberPad
textField.keyboardType = .numbersAndPunctuation
textField.keyboardAppearance = .dark
textField.clearsOnInsertion = true
textField.adjustsFontSizeToFitWidth = true
@@ -536,7 +526,7 @@ private extension Renderer {
decimalPlaces = 2
}
guard let newValue = Float(String(format: "%.\(decimalPlaces)f", _value)) else { return }
let newValue = _value.roundedDown(toPlaces: decimalPlaces)
switch newValue {
case minimum: textField.text = "MIN"