This is based on a project by TotemTraining for doing simple popups. Big shout out to them. See https://github.com/TotemTraining/DimBackground
Instead of using a black transparent background, it animates a UIVisualEffectView that does a dark blur animation.