How to update the presentation in iPhone every time before the presentation?

I have an application that has 7 tabs with corresponding views and view controllers. I need a way to update each view when it is selected. I searched and searched, but cannot find a way to do this.

viewDidLoad will not work, as it only works the first time a view is selected.

Capturing the selected tab in didSelectViewController will not work, because since there are more than 5 tabs, one of them is larger, and it starts only for the tab itself, and not for the main views when selected.

So, I think I need to know the following: is there a way I can invoke a view controller that will run EVERY time before this view is shown?

+3
source share
1 answer

To do this, you need to implement the delegation method -viewWillAppear:(BOOL)animated.

+5
source

Source: https://habr.com/ru/post/1728296/


All Articles