Add view overlay to iPhone app

Posted by Rob Lourens on Stack Overflow See other posts from Stack Overflow or by Rob Lourens
Published on 2010-05-04T21:30:00Z Indexed on 2010/05/04 21:38 UTC
Read the original article Hit count: 221

Filed under:
|

I'm trying to do something like this:

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

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?

© Stack Overflow or respective owner

Related posts about iphone-sdk

Related posts about iphone