Is there a way to reset a UI object like UITextField to the default iOS look and feel?
I ask because I’m putting a red border around a textfield as a part of form validation, and I’m having trouble removing the border so that the UITextField looks exactly as before. I can get it really really close, but it’s off just enough to be noticeable to someone who looks at iPhone screens all day :).

This is my code to give the UITextField a red border.
textfield.layer.borderWidth = 2.0f;
textfield.layer.borderColor = [[[UIColor redColor] colorWithAlphaComponent:0.5] CGColor];
textfield.layer.cornerRadius = 8.0f;
Default values are 0 for borderWidth and cornerRadius and black for borderColor.
You can also save those values to some field just before changing them and use the saved values when you need to reset the field. This will even work if the default values change in future.