Xcode Storyboard warning: Constraint referencing items turned off in current configuration. Turn off this constraint in the current configuration

摘自:http://stackoverflow.com/questions/26547399/xcode-storyboard-warning-constraint-referencing-items-turned-off-in-current-con

This warning can be annoying and happens as of Xcode 6.1.1. The main problem is that you can not easily find the referenced constraint by clicking on the warning. I guess this is a bug and will get fixed sooner or later.

However, in the meantime you can use this little workaround:

Step 1: Detect annoying warning 😱

Step 2: Right/Ctrl-Click on warning, selectReveal in Log😨

Step 3: Admire the beauty of the following log snippet:

...snip.../Devel/MyCrippledAppNG/MyCrippledApp/Main_iPad.storyboard:Dlb-cb-nWC:warning:Constraintreferencing items turned off in current configuration.Turnoffthisconstraint in the current configuration./Devel/MyCrippledAppNG/MyCrippledApp/Main_iPad.storyboard:6Ze-mO-v5N:warning:Constraintreferencing items turned off in current configuration.Turnoffthisconstraint in the current configuration./Devel/MyCrippledAppNG/MyCrippledApp/Main_iPad.storyboard:9av-xw-u1o:warning:Constraintreferencing items turned off in current configuration.Turnoffthisconstraint in the current configuration./Devel/MyCrippledAppNG/MyCrippledApp/Main_iPad.storyboard:RPt-Uf-vaZ:warning:Constraintreferencing items turned off in current configuration.Turnoffthisconstraint in the current configuration./Devel/MyCrippledAppNG/MyCrippledApp/Main_iPad.storyboard:Rnc-4M-7jV:warning:Constraintreferencing items turned off in current configuration.Turnoffthisconstraint in the current configuration./Devel/MyCrippledAppNG/MyCrippledApp/Main_iPad.storyboard:epJ-D9-KEF:warning:Constraintreferencing items turned off in current configuration.Turnoffthisconstraint in the current configuration./Devel/MyCrippledAppNG/MyCrippledApp/Main_iPad.storyboard:4HC-Gu-01w:warning:Constraintreferencing items turned off in current configuration.Turnoffthisconstraint in the current configuration....snip...

Hmmm... What's this...?

Step 4: Let's toss that into the project search bar... 😐

😮 Yep, you guessed right. Click it.

Step 5: 😁 OMG! Enjoy a few extra minutes of productivity until Apple fixes this annoying bug. 😎

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容