旋轉某些視圖時的風景,我得到這個日誌時:確定的約束越來越「無法同時滿足的約束」
無法同時滿足的約束。 以下列表中的至少一個約束可能是您不想要的。試試這個:(1)看看每個約束,並試圖找出你不期望的; (2)找到添加不需要的約束或約束並修復它的代碼。 (注意:如果你看到,你不明白NSAutoresizingMaskLayoutConstraints,請參閱文檔UIView的財產translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x17009b3f0 V:[UILabel:0x14c51ed20'Welcome to...'(>=54)]>",
"<NSLayoutConstraint:0x17009b580 V:[MyApp.LogoHeaderView:0x14c51f3e0]-(82)-[UILabel:0x14c51ed20'Welcome to...']>",
"<NSLayoutConstraint:0x17009b2b0 V:[UILabel:0x14c51ed20'Welcome to...']-(30)-[UIView:0x14c51e7e0]>",
"<NSLayoutConstraint:0x170280230 V:[MyApp.LogoHeaderView:0x14c51f3e0]-(0)-[UIView:0x14c51e7e0]>"
)
將嘗試打破約束
恢復
<NSLayoutConstraint:0x17009b3f0 V:[UILabel:0x14c51ed20'Welcome to...'(>=54)]>
在UIViewAlertForUnsatisfiableConstraints中創建一個符號斷點以在調試器中捕獲此斷點。 列出的UIView上的UIConstraintBasedLayoutDebugging類中的方法也可能有所幫助。
而我什麼都不懂。我添加了象徵性的UIViewAlertForUnsatisfiableConstraints
斷點,但內存地址告訴我什麼都沒有......我怎樣才能以一種更可靠的方式找到這個日誌所討論的約束條件?
在此先感謝
http://stackoverflow.com/questions/25630315/autolayout-unable-to-simultaneously-satisfy-constraints – luk2302
@ luk2302非常感謝 – AppsDev