title: iPhone: Add "loading" subView
body: <p>I am wanting to show a simple loading dialog when certain things are happening in my app.  I figured I would just create a new view, add a label to that, and then set that view to a subView of my current view. </p>
  
  <p>When doing this, I don't see anything! </p>
  
  <p>Here is how I am writing my method:</p>
  
  <pre><code>- (void)showLoading {
      UIView *loading = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)];
      loading.backgroundColor = [UIColor blackColor];
      UILabel *txt = [[UILabel alloc] initWithFrame:CGRectMake(198, 9, 94, 27)];
      txt.text = @"Loading...";
      txt.textColor = [UIColor whiteColor];
      [loading addSubview:txt];
      [super.view addSubview:loading];
      [super.view bringSubviewToFront:loading];
      [loading release];
      [txt release];
  }
  </code></pre>
  
  <p>Am I doing this completely wrong?</p>
  
  <p>EDIT:
  I added it to the viewDidLoad method, and it works how I want:</p>
  
  <pre><code>loading = [[UIView alloc] initWithFrame:CGRectMake(100, 100, 200, 200)];
      loading.backgroundColor = [UIColor blackColor];
      UILabel *txt = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 94, 27)];
      txt.text = @"Loading...";
      txt.textColor = [UIColor whiteColor];
      [loading addSubview:txt];
      [txt release];
      [self.view addSubview:loading];
      [self.view bringSubviewToFront:loading];
  </code></pre>
  
  <p>But when loading it from a method, it seems to lag, and not show up for a bit.</p>