 
         set(newValue)
         {
-            let numFormatter = textField.formatter as! NSNumberFormatter
-            numFormatter.maximum = newValue
+            let numFormatter = textField.formatter as! NumberFormatter
+            numFormatter.maximum = newValue as NSNumber
             stepper.maxValue = Double(newValue)
         }
     }


        set(newValue)
        {
            let numFormatter = textField.formatter as! NSNumberFormatter
            numFormatter.minimum = newValue
            stepper.minValue = Double(newValue)
        }
    }

            newValue = stepper.integerValue
            textField.integerValue = newValue!
        }
        if newValue != nil
        {
            self.sendAction(self.action, to: self.target)
        }
