To me it looks like the safe area of a view is not updated after the owning view controller's .viewWillDisappear()
method is called.
Is this intended or a bug in the framework?
The issue is easily visualised by creating a custom UIViewControllerTransitioningDelegate
that animates a smaller view in one view controller, to full screen size in another (constrained to safe areas). Then the safe areas will expand as the present animation goes on (as expected), but will not shrink as the dismiss animation goes on (not expected!). The expected behaviour would be that the safe area expands during the present animation, and shrinks during the dismiss animation.
The gif below shows the unexpected behaviour. The grey area of the presented view controller is the safe area.
I've attached the code I used to visualise this problem. ViewController.swift
presents MyViewController.swift
using FullScreenTransitionManager.swift