You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Can't see error text when field in table view cell #6
First off, thanks for writing and publishing this!
When I add error text to a field, the underline turns red, but I cannot see the error text. If I use Reveal to look at the views, the text is there, but hidden.
The field is attached to all 4 sides of the content view of the cell, and the cell should grow based on autolayout (height methods return UITableViewAutomaticDimension).
Any thoughts on how to get this to work? I also tried changing the error padding, but no help.
Thanks
Looks like it's a problem with dynamic height tableview cells. I had a play around with it on the weekend but couldn't get it to work the way it should. I would like to improve the way I'm setting up constraints on the error label, so I'll have a go at that when I get the time over the next few weeks. (I'm moving overseas so I'm a bit busy right now!)
As a workaround in the mean time, instead of returning UITableViewAutomaticDimension from tableView:heightForRowAtIndexPath:, calculate the height of the cell using the textfield's intrinsic content size. This seemed to work ok for me. For example:
Activity
stephsharp commentedon Mar 15, 2016
Thanks for raising this issue.
Looks like it's a problem with dynamic height tableview cells. I had a play around with it on the weekend but couldn't get it to work the way it should. I would like to improve the way I'm setting up constraints on the error label, so I'll have a go at that when I get the time over the next few weeks. (I'm moving overseas so I'm a bit busy right now!)
As a workaround in the mean time, instead of returning
UITableViewAutomaticDimensionfromtableView:heightForRowAtIndexPath:, calculate the height of the cell using the textfield's intrinsic content size. This seemed to work ok for me. For example: