Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decrease the number of times each component is calculated #5

Open
MattLewin opened this issue Sep 19, 2018 · 0 comments
Open

Decrease the number of times each component is calculated #5

MattLewin opened this issue Sep 19, 2018 · 0 comments

Comments

@MattLewin
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant