Since this commit, which was introduced in ver 4.0.0, viewWillDisappear is being called in unexpected situations.
Here is how to reproduce it:
Place PagingViewController and a UILabel in ViewController using a UIStackView.
Transition from FirstViewController in PagingViewController to SecondViewController using pushViewController.
Go back and change the layout in ViewController (e.g., hiding the UILabel).
At this point, didLayoutSubviews is initialized in PagingViewController.viewDidDisappear, but since viewDidLayoutSubviews is not called during the screen transition, didLayoutSubviews remains in the initialized state. This causes viewWillDisappear to be called unexpectedly when layout changes occur.
Transitioning from the ViewController in PagingViewController and returning to it is a common pattern in many use cases, and it is essential to address this issue because screen layout changes are often assumed in such cases.
Please find the code snippet below that reproduces the issue:
Since this commit, which was introduced in ver 4.0.0, viewWillDisappear is being called in unexpected situations.
Here is how to reproduce it:
At this point, didLayoutSubviews is initialized in PagingViewController.viewDidDisappear, but since viewDidLayoutSubviews is not called during the screen transition, didLayoutSubviews remains in the initialized state. This causes viewWillDisappear to be called unexpectedly when layout changes occur.
Transitioning from the ViewController in PagingViewController and returning to it is a common pattern in many use cases, and it is essential to address this issue because screen layout changes are often assumed in such cases.
Please find the code snippet below that reproduces the issue: