View As different device misplaces centered label

2019-08-27 17:30发布

问题:

Using Xcode 10.1, I create a tableview on my main storyboard. In the prototype cell, I place a text label. I then create constraints to match it's center with its superview center, both horizontally and vertically. So the label should be centered in the cell. All looks good. When I choose "View as" a different device, it is misaligned horizontally. However when I run in the simulator, it appears to be working OK. Is this an Xcode bug or is there something I'm not understanding about the way interface builder works and displays the label?