Can't see error text when field in table view cell
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
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 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:
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return self.textField.intrinsicContentSize.height;
}