On the iPhone X in portrait mode, if you set a bottom constraint to safe area to 0, you will end up with an extra space at the bottom of the screen. How do you get programma
iOS 11 (a mix from answers above)
let padding = UIApplication.shared.keyWindow?.safeAreaInsets.bottom ?? 0