I posted what seems to be the answer in my second update, but for clarity:
X and Y的值.尽管如此，尽管为什么在Xcode 10/iOS 12中要求这么做，layoutIfNeeded似乎已经解决了这个问题.
I added a
self.layoutIfNeeded() just after applying the anchor constraints and that seems to have solved the issue. Although looking at the frame for self and I get
-199,-100,398,200 Cannot say I understand the values for
X and Y. Nevertheless the layOutIfNeeded seems to have solved the problem although why this is required in Xcode 10/ iOS 12 is also a mystery.