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

zizuo picture zizuo  路  3Comments

pteasima picture pteasima  路  3Comments

Isuru-Nanayakkara picture Isuru-Nanayakkara  路  3Comments

JonathanImperato picture JonathanImperato  路  3Comments

jaylyerly picture jaylyerly  路  3Comments