Reputation: 89
How can I refresh a viewcontroller?. I.e. I have a series of animations that run into the viewdidload and want to reload the viewcontroller again, really it would be reload the viewdidload again?
It would be an action assigned to a UIButton
thanks
Upvotes: 0
Views: 544
Reputation: 21
You should do it by that way:
- (void)viewDidLoad {
[self setUpInterface];
}
//for UIButton Action
- (IBAction)buttonTapped: (id)sender {
[self setUpInterface];
}
//for your aninmations
- (void)setUpInterface {
//your code for animation here
}
don't try to call viewDidLoad, it isn't good. Goodluck!
Upvotes: 1