title: how to show progressbar in navigation bar like in messages application in iphone?
body: <p>how to show the progressbar in navigation bar as in iphone messages application. 
  For that, you can refer the below link for showing progressbar</p>
  
  <p><a href="http://www.apple.com/iphone/features/messages.html" rel="nofollow noreferrer">http://www.apple.com/iphone/features/messages.html</a></p>
  
  <p>I try to do that by using toolbar but result are not as like in messages application.</p>
  
  <p>-(void) createToolbar</p>
  
  <p>{</p>
  
  <pre><code>toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(95.0,15,130,47.0)];
  
  UIBarButtonItem *flexibleItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];
  ProgressView = [[UIProgressView alloc] initWithProgressViewStyle:0];
  [ProgressView setProgress:0.0];
  [ProgressView setFrame:CGRectMake(0,30,80,10)];
  
  UIBarButtonItem *homeItem = [[UIBarButtonItem alloc] initWithCustomView:ProgressView];
  
  
  NSArray *items = [NSArray arrayWithObjects:flexibleItem, homeItem, flexibleItem,nil];
  [toolbar setItems:items animated:YES];
  [self.view addSubview:toolbar];
  </code></pre>
  
  <p>}</p>
  
  <p>The above code shows the toolbar on top of screen with progress bar in center but that time it require to hide navigation bar otherwise toolbar is shown below the navigation bar.
  I needs to show the progress bar in navigation bar. </p>