Reloading a ViewController

If you know your database has been updated and you want to just refresh your ViewController (which was my case). I didn’t find another solution but what I did was when my database updated, I called:

[self viewDidLoad];

again, and it worked. Remember if you override other viewWillAppear or loadView then call them too in same order.
like.

[self viewDidLoad];
[self viewWillAppear:YES];

I think there should be a more specific solution like refresh button in browser.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)