문제

I am working on my first simple tabview controller app. The first tab is a setup tab, and I just had a tester provide an unexpected use case. In order to address this use case, I need to execute when the user is leaving the view and before I load the next one. Running code in the next view is too late.

What method is called from the current viewController at the point the user selects the TabView Controller to switch views?

I've tried using viewWillDisappear as the point to execute my code, but this does not appear to be called when switching views.

도움이 되었습니까?

해결책

OK, had to restructure the code to remove the dependency. Have decided to store the state of each screen element and then access it when needed on the secondary view.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top