I am changing that safe area height using key window, this VC presents modally over another VC and keyWindow was depreciated. How can I solve this?
// set the new top constraint value for card view
// card view won't move down just yet, we need to call layoutIfNeeded()
// to tell the app to refresh the frame/position of card view
if let safeAreaHeight = UIApplication.shared.keyWindow?.safeAreaLayoutGuide.layoutFrame.size.height,
let bottomPadding = UIApplication.shared.keyWindow?.safeAreaInsets.bottom {