title: how to set label to center in uitoolbar
body: <p>I am developing an universal app for iOS so that I have to set label to center in <code>UIToolBar</code>. Please help me to do this.</p>
  <h3>The code I have implemented</h3>
  <pre><code>UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 250, 40)];
  label.backgroundColor = [UIColor clearColor];
  UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithCustomView:label];
  NSDateFormatter *format = [[NSDateFormatter alloc] init];
  [format setDateFormat:@&quot;dd-MM-yyyy  hh:mm a&quot;];
  NSDate *now = [[NSDate alloc] init];
  NSString *dateString = [format stringFromDate:now];
  label.text = dateString;
  </code></pre>