The problem is that you have an infinite loop.
If you call [self setTextColor:
in layoutSubviews
of your UITextField
subclass, you create an infinite loop because setTextColor
causes layoutSubviews
to be called again: UITextView setTextColor changes layout in UITableViewCell
That's why it takes a while for the error to appear: The app runs out of memory. You can probably verify this by running it with Instruments.
Never call anything from layoutSubviews
that triggers layoutSubviews
.