是的,@the4kman 是对的 - 这是一个重复的问题; 我按照建议解决了iOS 11.2的问题(除了我在viewWillAppear中解决了它):https://dev59.com/2VYN5IYBdhLWcg3wO2DE#47754627
For iPhone X support follow below things:
1. Enable Safearea to your ViewController's XIB or Storyboard's ViewController
2. Top Touchable controls (Button, textfield etc) should be top from SafeArea not from superview
3. Bottom Touchable controls (Button, textfield etc) should be bottom to SafeArea not from Superview.
If you are not following above things not sure touch (Top and Bottom) will work or not. If you follow all will work fine