Quote:
Originally Posted by jsd
are the label and activity on the same view as the rest of the login form? if so you will need to create another view to contain them. you should then be able to move the container view backwards and forwards.
you could hook the container view up to your code with an IBOutlet and then use [containerView removeFromSuperview] and [self.view addSubview:containerView] to get it off and on the screen.
|
Thanks jsd.
I appreciate your quick response.
Quote:
|
are the label and activity on the same view as the rest of the login form?
|
Yes, I had them together under my 'loadingView' which I created in IB, and created an outlet for in XCode (same as your suggestion).
I realized moving them back/forward was not really what I needed in this case. Also, adding as subview wasn't working since my loadingView was already a subview of the container class.
In this case I ended up using IB to start the loading view off as hidden (it worked for hiding the subviews, too), then in my button's action method I used:
Code:
loadingView.hidden = NO;
and this worked to show it.
Maybe what would make more sense is to not have the loading view as a subview to start out (this is a result of not being well-versed with IB), but to create a subclass of UIView to use as a general loading indicator class, and add it whenever needed with addSubview:.
I'll try that out later when I refactor, and update this post accordingly.