title: Avoid UIDatePicker transparency in iOS7
body: <p>i just upgraded my app to iOS7 and found that date picker is transparent.
  It looks like I can see everything which is behind the date picker. 
  How can I avoid this? </p>
  
  <p>I tried to place date picker in another view. But still, its transparent.
  How can I avoid transparency of <code>UIDatePicker</code>? I've tried <a href="https://i.stack.imgur.com/7UQIG.png" rel="nofollow noreferrer">this link</a>
  <a href="https://i.stack.imgur.com/7UQIG.png" rel="nofollow noreferrer">1</a>: <a href="https://stackoverflow.com/questions/18807940/can-i-change-the-font-color-of-the-datepicker-in-ios7">can I change the font color of the datePicker in iOS7?</a> but it didn't work.
  Thanks in advance.</p>
  
  <p>Edit : I've added a <code>UIDatePicker</code> to a view named <code>whiteborderview</code>.</p>
  
  <pre><code>whiteborderview.backgroundColor = [UIColor whiteColor];
  
  whiteborderview.alpha = 1.0;
  
  [whiteborderview addSubview:dtPkrStart] 
  </code></pre>
  
  <p>and I got output like this</p>
  
  <p><img src="https://i.stack.imgur.com/7UQIG.png" alt="transparent datepicker"></p>
  
  <p>but still its transparent.</p>
  
  <p><strong>Edit2</strong> </p>
  
  <p>I used this code and now its looking better than previous one </p>
  
  <pre><code>[UIView appearanceWhenContainedIn:[UITableView class], [UIDatePicker class], nil].backgroundColor = [UIColor colorWithWhite:1 alpha:1];
  
  dtPkrStart.backgroundColor = [UIColor blackColor];
  </code></pre>
  
  <p>The date picker appearence changed like this <img src="https://i.stack.imgur.com/kgtzk.png" alt="date picker new look"></p>