title: how to change UISearchBar textfield background color and text color in ios8
body: <p>I used below code for changing UISearchBar textfield background color.</p>
  
  <pre><code>[[UITextField appearanceWhenContainedIn:[UISearchBar class], nil] setDefaultTextAttributes:@{
                                                                     NSForegroundColorAttributeName : [UIColor redColor],
                                                                       NSFontAttributeName : [UIFont systemFontOfSize:15]
                                                              }];
  </code></pre>
  
  <p>but it does not work for me, can any one give solution.
   thanks in advance</p>