user1908661
user1908661

Reputation: 89

Reload viewcontroller

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

Answers (1)

Dat Tran
Dat Tran

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

Related Questions