title: iOS - How to Reset a UI Object to Default Style
body: <p>Is there a way to reset a UI object like <code>UITextField</code> to the default iOS look and feel?</p>
  
  <p>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 <em>exactly</em> 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 :).</p>
  
  <p><img src="https://i.stack.imgur.com/5UWjy.png" alt="enter image description here"> <img src="https://i.stack.imgur.com/d2EEg.png" alt="enter image description here"></p>
  
  <p>This is my code to give the UITextField a red border.</p>
  
  <pre><code>textfield.layer.borderWidth = 2.0f;
  textfield.layer.borderColor = [[[UIColor redColor] colorWithAlphaComponent:0.5] CGColor];
  textfield.layer.cornerRadius = 8.0f;
  </code></pre>