Skip to content

Decrease the number of times each component is calculated #5

@MattLewin

Description

@MattLewin

Is your feature request related to a problem? Please describe.
Each picker component is (re)calculated too frequently. While it may be necessary to recalculate and layout the picker when the number of digits in the picker changes or the font size changes, it seems like we are doing it far too frequently. As an example, NumericPicker-Example makes 644 calls to pickerView(_:titleForRow:forComponent:) before anything appears.

Describe the solution you'd like
I want fewer calls made to pickerView(_:titleForRow:forComponent:), pickerView(_:viewForRow:forComponent:reusing:), pickerView(_:widthForComponent:), and pickerView(_:rowHeightForComponent:).

Describe alternatives you've considered
Do nothing, as I've never noticed this in real-world app usage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions