         }
     }
 
-    // MARK: - Functions to facilitate testing
-    
+    /**
+     Resizes the `NumericPicker` to contain the all components. Called when a property affecting the picker's
+     appearance changes.
+     */
+    func resize() {
+        var pickerSize = picker.bounds.size
+        pickerSize.width = widthOfPickerView()
+        picker.bounds.size = pickerSize
+        frame.size = pickerSize
+        picker.frame = bounds
+    }
+
+    /**
+     Calculates the width of the picker based on the number of components.
+
+     - returns: the new width of the picker
+     */
     func widthOfPickerView() -> CGFloat {
         let componentWidth: CGFloat! = picker.delegate?.pickerView!(picker, widthForComponent: 0)
         let componentCount = CGFloat((picker.dataSource?.numberOfComponents(in: picker))!)

    /// The locale used for numeric presentation. (defaults to current locale)
    public var locale = Locale.current {
        didSet {
            updatePicker()
        }
    }


    /// Number of digits to display to the right of the decimal separator (defaults to `0`)
    @IBInspectable public var fractionDigits: Int = 0 {
        didSet {
            updateValue()
            resize()
        }
    }

