I am trying to make my UINavigationController and its children transparent such that the content behind them can be seen. However, simply setting backgroundColor = .clear isn't enough, as there is now an issue that during push/pop transitions, the bottom child view controller is visible through the transparent top child view controller.
I have worked around this by setting the layer.mask of the bottom view controller's view, and updating the mask bounds on every animation frame so that it appears that the top view controller is covering the bottom one, even though they are both transparent.
There are a few questions I have about this approach:
I have worked around this by setting the layer.mask of the bottom view controller's view, and updating the mask bounds on every animation frame so that it appears that the top view controller is covering the bottom one, even though they are both transparent.
There are a few questions I have about this approach:
Is there a way to achieve this affect without manually masking the views?
Can I update the masks during the animation without running a rapid timer?
UINavigationController inserts a view of type _UIParallaxDimmingView between the two view controllers during the transition, which also needs to be masked. Is there a better way to obtain a reference to this view other than my current approach (searching for a subview with a non-nil background color)