Hi all,
I was working with a tableView and my simulator was set to iphoneX. The table needed to be in the middle of the view horizontally but vertically there was the page title above it, so it was shifted down a bit.
Originally I used the “top, left” properties to set the table and everything was working fine until I switch the simulator to iPad. The table was no longer in the middle. I thought, that was wasy to fix by setting the x property to display.contentCenterX instead of using “left”, but I kept the “top” property, as vertical positionning was OK.
This didn’t solve the problem. Printing the value of x, I noticed that it was not being set to display.contentCenterX.
After debugging for a bit I noticed that things work if I replace “top” with “y” and calculate the y value manually.
Does this mean we can’t mix “x” or “y” with "left or “top”? I assumed that all “left”, “top” do is to (internally) calculate “x,y”, since “left, top” are not readable properties at runtime.
If that is the case then maybe it should be added to the “Gotchas” section.