uitableviewrotationxcode10ios12iphone-xs

Strange behavior of UITableViewController in iOS12 notch models, when the language setting of iPhone is Japanese or Chinese


This problem occurs depending on the language setting of iPhone.
I was able to confirm this problem in Japanese and Chinese.
In English etc. this problem does not occur.

I have created a simple project that installing UINavigationController on the storyboard, using Xcode10. rootViewController is the default UITableViewController.
I have not changed anything nearly anything on the storyboard.
I use an array of Strings 1 to 5 as datasource of UITableView.

If I build and rotate this on iOS12, UITableView will be plus offset top or it will be under NavigationBar.
This problem does not occur in iOS11. Also, no problems will occur in models without notch.
This problem occurs only with notched models of iOS12. (iPhone X, XS, XS Max, Xr)

Does anyone know the cause of this strange problem?
Thank you.

strange plus offset of top

under NavigationBar

I uploaded my project to GitHub. Could you confirm it?

yaslam2222/SimpleTableViewController


Solution

  • I think you've found a bug! (As you have rightly explained, this happens only on an X device, only in iOS 12, and only in a Chinese or Japanese environment.)

    Here is a workaround — not very satisfactory, but at least it is a workaround:

    override func viewDidLoad() {
        super.viewDidLoad()
        self.edgesForExtendedLayout = []
    }