For me the problem was in using trailing leading alignment on UIButton itself.
Safe area seems to be completely fine to use – it’s backward compatible and it translates into proper super view margins.
But this feature is iOS 11 only, so use standard left / right alignment instead if you are targeting lower iOS versions.
Easiest way to find out which view is causing the problem is to search for contentHorizontalAlignment="leading" or contentHorizontalAlignment="trailing" in source code for .xib
