 }
 
 class Item: UIImageView {
-    var value: Float = 0.0
+    var value: RatePoint = .zero
     override func updateConstraints() {
         translatesAutoresizingMaskIntoConstraints = false
         widthAnchor.constraint(equalToConstant: frame.width).isActive = true

        get {
            return arrangedSubviews.flatMap{$0 as? Item}
                .map{$0.value}
                .reduce(0.0, +)
        }
    }
    override func updateConstraints() {

        v.config = config
        return v
    }
    var value: RatePoint {
        set(newValue) {
            assert(newValue <= config!.maxRate)
            let items = arrangedSubviews.flatMap{$0 as? Item}
            let compare = (newValue*10).intValue // 0-50
            for (i, v) in items.enumerated() {
                let expectedZero: Int = i*10+3
                let expectedFull: Int = (i+1)*10-3
                if compare < expectedZero {
                    v.value = .zero
                    if let image = config?.zero {
                        v.image = image
                    }
                } else if expectedZero <= compare && compare <= expectedFull {
                    if let image = config?.half {
                        v.value = RatePoint(number: 0, point: 5)
                        v.image = image
                    }
                } else {
                    v.value = RatePoint(number: 1, point: 0)
                    if let image = config?.full {
                        v.image = image
                    }
