I want to have a borderless UITextField but underneath have a 1 or 2 pixel high guide line that underlines the field. To be clear, I don't want just the text INSIDE the UITextField to be underlined, but the field, whether it's empty or full of text.
An example is seen in this example of Google Material Design:
So of course I could just stick in a UIImage that shows a solid color and fit it to that space, but that doesn't seem quite elegant, is there a better way that's more "correct" and future-proof if I'm worrying about how my code will work several generations of iOS down the line and on who knows what devices?
p.s. would rather do this from scratch using Obj-C than find a library.
I actually just did this yesterday... Subclass UITextField and this will work.
Note: It would be cleaner though to use textFieldDidBeginEditing: and textFieldDidEndEditing: to do the changing of the line height and color, either through NSNotificationCenter or delegate methods.