Failed to automatically update constraints

2019-04-24 02:00发布

问题:

I am getting the Failure to automatically update constraints error when trying to use the auto layout to Add, Reset, or Update any restraints on any viewController after updating to xCode 9. Any ideas? I have already cleaned and restarted my Mac.

Still have not found a solution for this. I narrowed it down to any viewController with a collectionView inside it. Any ideas?

回答1:

I got also this error, when I tried to update/add etc. my constraints error image

I use Xcode Version 9.0 (9A235) and I spent the whole day figuring it out. I solved my problem by deleting a segmentctrl in the navigation bar. all my controller with a segctrl in the nav bar seems to bug.

I made a video with a new project https://www.youtube.com/watch?v=TOTzCfDoFNA&feature=youtu.be



回答2:

Remove the navigationbar in your view controller in storyboard .For me it is working well.



回答3:

For everyone following this. xCode 9.0.1 is out. Tested and it fixes this error. I haven’t be able to reproduce.



回答4:

@Rumbel you are correct , its a bug from apple in Xcode 9.0

watch this youtube segment control bug in IOS 11 and Xcode 9.0