I have a UIView that is in my mainWindow.xib.
UIView *loadingView; @property (nonatomic, retain) IBOutlet UIView *loadingView;
The view has a label and UIActivityIndicator on it, and I'm trying to use the view as a "Please wait, loading..." screen. Before I push a new view onto the stack, I call [window bringSubviewToFront:loadingView] from the main delegate. The new view is pushed onto the stack, and in the viewDidLoad method of the new view I load some data across the web. Once this data transfer completes, I am calling [window sendSubviewToBack:loadingView]; at the end of viewDidLoad method.
If I test it just calling the bringSubviewToFront method only, the view is placed on top of every other view, which is working as planned. I shortened the loadingView height so I can see the new view correctly load behind it. If I add the SendSubviewtoBack after all my web service calls have completed on the new view, the loadingView never becomes visible. Is this a threading issue, or logic issue? I'm not sure how to fix it.
Thanks!