title: adding progress bar under navigation bar
body: <p>I am new to iOS development. </p>
  
  <p>I would like to know if in iOS 7 when sending a message under <code>UINavigationBar</code>, which has a title called : Sending, there is a progress bar that is loading till the message is successfully sent.</p>
  
  <p>My question is:</p>
  
  <ol>
  <li><p>Is that bar a progress bar?</p></li>
  <li><p>In iOS 6, the progress bar is inside the <code>UINavigationBar</code>? </p></li>
  </ol>
  
  <p>Can someone give me some ideas about how to create this on iOS 7 and iOS6?</p>
  
  <p>I haven't yet tried anything. I would like to read some tutorials or examples with this type of issue.</p>
  
  <p>Here is my code:</p>
  
  <p>int progress=50;</p>
  
  <pre><code>    CGRect navframe = [[self.navigationController navigationBar] frame];
      int height= navframe.size.height;
      sendView = [[UIView alloc] init];
      sendView.frame = CGRectMake(0, 0, 200, 30);
      sendView.backgroundColor = [UIColor clearColor];
      UILabel* lbl = [[UILabel alloc] init];
      lbl.frame = CGRectMake(0,0, 200, 15);
      lbl.backgroundColor = [UIColor clearColor];
      lbl.textColor = [UIColor whiteColor];
      lbl.shadowColor = [UIColor colorWithWhite:0 alpha:0.3];
      lbl.shadowOffset = CGSizeMake(0, -1);
      lbl.font = [UIFont boldSystemFontOfSize:12];
      lbl.text = @"";
      lbl.textAlignment = UITextAlignmentCenter;
      [sendView addSubview:lbl];
      UIProgressView* pv = [[UIProgressView alloc] initWithProgressViewStyle:UIProgressViewStyleBar];
      pv.frame = CGRectMake(0, 30-pv.frame.size.height, 200, pv.frame.size.height);
      pv.progress = progress/100.0;
  
    [sendView addSubview:pv];
      [self.navigationController.navigationBar addSubview:sendView];
  </code></pre>
  
  <p>Unfortunalty the progress bar is not under the navigationController. Why?</p>