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

Implements support for UITableViewCellStyleSubtitle on FieldRow #1468

Merged
merged 1 commit into from
Mar 21, 2018
Merged

Implements support for UITableViewCellStyleSubtitle on FieldRow #1468

merged 1 commit into from
Mar 21, 2018

Conversation

txaiwieser
Copy link
Contributor

@txaiwieser txaiwieser commented Mar 19, 2018

Hey guys! First of all I would like to thank you all for the work you do! :D

Case:
Almost all row types in Eureka use a stock UIKit UITableViewCell as underlying cell. So if you change the UITableViewCellStyle of that cell if automatically changes the UI of the Eureka row.

But that are some rows that are backed by a custom Eureka row (FieldRow). So setting the UITableViewCellStyle of that cell doesn't affect the UI.

Solution:
I've changed the customConstraints method on FieldRow to change its layout if the row have a .subtitle style.

I develop in a way it doesn't modify the previous behaviour (keeping the same code). And just add an case for this new style.

The new layout code is very similar to the old one, so I guess its self explanatory.

We are using in production for some time. And we think this should be the available to everyone.

Any improvements or comments are welcome. Maybe we can improve it even more!

Thanks

@mats-claassen mats-claassen merged commit 0791f20 into xmartlabs:master Mar 21, 2018
@mats-claassen
Copy link
Member

Thanks for the contribution!

@txaiwieser
Copy link
Contributor Author

txaiwieser commented Mar 21, 2018

🚀 😄

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

Successfully merging this pull request may close these issues.

2 participants