问题
Just updated to Xcode 9 and converted my project to Swift 4 but one of my app screens with a tableview has begun to show as such:
I've removed all but one stack view and just placed all my elements in that one stack view with the constraints clipped to 0,0,0,0
it should look like this:
What's going on here?
回答1:
This was a simple fix once I sat down and looked at it with fresh eyes.
Make sure your constraints are bounding to a view instead of another item in the view.
I cleared constraints and added a stack-view then added constraints carefully making sure it was bounding to a view.
来源:https://stackoverflow.com/questions/46621966/upgraded-to-xcode-9-swift-4-now-auto-layout-is-whacked