Add view overlay to iPhone app
<p>I'm trying to do something like this:</p>

<pre><code>- (void)sectionChanged:(id)sender {
    [self.view addSubview:loadingView];
    // Something slow
    [loadingView removeFromSuperview];
}
</code></pre>

<p>where loadingView is a semi-transparent view with a UIActivityIndicatorView.  However, it seems like added subview changes don't take effect until the end of this method, so the view is removed before it becomes visible. If I remove the removeFromSuperview statement, the view shows up properly after the slow processing is done and is never removed. Is there any way to get around this?</p>
