Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dismissViewControllerAnimated doesnt load viewDidLoad again

I have tried a few things which havent really worked (more things I have thought of).

When using [self dismissViewControllerAnimated:YES completion:nil]; I need it to run the viewDidLoad method of the controller I am going back to.

How can I do this? I thought maybe in the completion however, it would access the viewDidLoad of this class rather than of the one im resuming to.

like image 680
Josh Boothe Avatar asked Aug 30 '26 22:08

Josh Boothe


1 Answers

ViewDidLoad method is called only once. After dismissViewControllerAnimated is called parentViewControllers viewWillAppear method is called.

Write you code from viewDidLoad to viewWillAppear

like image 96
Durgaprasad Avatar answered Sep 01 '26 19:09

Durgaprasad



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!