so in my main storyboard I created an activity indicator.
And I want to hide the activity indicator until a button is pressed. Is there any way I can do this?
Here is my code, when I click the button, the activity indicator starts animatig.
self.indicator.hidden = NO;
[self.indicator startAnimating]
[self performSelector:@selector(showData) withObject:nil afterDelay:2.0f]
So, again the question is, can I hide the activity indicator until the button is pressed, and then it will show this activity indicator.
source
share