Eureka: StepperRow decimal precision

Created on 7 Aug 2017  路  1Comment  路  Source: xmartlabs/Eureka

Is there a way to change the decimal precision of a stepper row? I would like to have just an integer instead of double.

Stack Overflow StepperRow

Most helpful comment

let stepperRow = StepperRow() {
    $0.cell.stepper.stepValue = 1
    $0.displayValueFor = { value in
        guard let value = value else { return nil }
        return "\(Int(value))"
    }
}

>All comments

let stepperRow = StepperRow() {
    $0.cell.stepper.stepValue = 1
    $0.displayValueFor = { value in
        guard let value = value else { return nil }
        return "\(Int(value))"
    }
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

funkenstrahlen picture funkenstrahlen  路  19Comments

marbetschar picture marbetschar  路  18Comments

geoffmacd picture geoffmacd  路  16Comments

RSickenberg picture RSickenberg  路  15Comments

xiao99xiao picture xiao99xiao  路  42Comments