Eureka: How to create a CountDownInlineRow with minutes and seconds? feature: PickerView supporting many components.

Created on 4 Jan 2016  路  9Comments  路  Source: xmartlabs/Eureka

Instead of selecting hours and minutes, what's the proper way to setup CountDownInlineRow to select minutes and seconds?

DoublePickerRow

Most helpful comment

There is no a easy way to accomplish this using Eureka build in rows.

To support this functionality we will have to add a new row that supports more than one picker view component since PickerInlineRow supports only one.

In your particular case, we can solve it having 2 components (mins and seconds).

Let's think a little bit more about it, i don't have any elegant solution in mind right now.

All 9 comments

There is no a easy way to accomplish this using Eureka build in rows.

To support this functionality we will have to add a new row that supports more than one picker view component since PickerInlineRow supports only one.

In your particular case, we can solve it having 2 components (mins and seconds).

Let's think a little bit more about it, i don't have any elegant solution in mind right now.

I have done this in a project, and it isn't awfully hard to accomplish.

The only real problem was value having to be an Equatable collection and a Set wouldn't do because of the order being relevant (first component => first value, etc) and that you could select the same value in both components 1 and 1 in this case (being 1 second and 1 minute). And Array doesn't officially implement the Equatable protocol.

Swift 3 will will probably have Arrays implement Equatable for Equatable elements (can't find where they said so right now), but for now I solved it by wrapping Array in an EquatableArray (https://github.com/mikaoj/EquatableArray) :)

+1 need solution for this

+1

Any update on this? Any hack anyone knows of to allow a user to input minutes seconds?

Echoing the request for support of multi component picker rows.

Would clean up a lot of my forms that require an IntRow and SegmentedRow if I could prompt a picker that had component 1 being an Int of 0-100 and component 2 being a series of pre-defined Strings.

Likewise I have some deep hierarchical menus and need dual pickers for strings. Would really value help here.

DoublePickerInlineRow, DoublePickerRow, DoublePickerInputRow rows provide this functionality.
It will be released in the next Eureka version (current 4.1.1), for now use master branch.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

s1rc picture s1rc  路  3Comments

tc picture tc  路  3Comments

zoul picture zoul  路  3Comments

Isuru-Nanayakkara picture Isuru-Nanayakkara  路  3Comments

JonathanImperato picture JonathanImperato  路  3Comments