         picker.dataSource = self
         addSubview(picker)
     }
-    
+
     required public init?(coder aDecoder: NSCoder) {
         super.init(coder: aDecoder)
         picker.delegate = self
         picker.dataSource = self
         addSubview(picker)
     }
-    
+
     convenience public init() {
         self.init(frame: CGRect.zero)
     }
-    
+
     func widthOfPickerView() -> CGFloat {
         let componentWidth: CGFloat! = picker.delegate?.pickerView!(picker, widthForComponent: 0)
         let componentCount = CGFloat((picker.dataSource?.numberOfComponents(in: picker))!)
         return componentCount * componentWidth + (componentCount - 1) * (componentWidth / 2) // Account for spacing between components
     }
-    
+
     func updatedDisplayString(value: Double, fractionDigits: Int) -> String {
         let nf = NumberFormatter()
         nf.locale = locale

import UIKit

@IBDesignable public class NumericPicker: UIControl {
    
    // MARK: - Properties
    override public var intrinsicContentSize: CGSize {
        return picker.bounds.size

            let title = self.pickerView(pickerView, titleForRow: selectedRow, forComponent: index)
            stringValue = stringValue + title!
        }

        let nf = NumberFormatter()
        nf.locale = locale
        nf.minimumIntegerDigits = minIntegerDigits
        nf.maximumFractionDigits = fractionDigits
        nf.numberStyle = .decimal
        nf.usesGroupingSeparator = true

        let value = nf.number(from: stringValue)
        self.value = value?.doubleValue ?? 0.0
        sendActions(for: .valueChanged)
