0

私のプロジェクトはXcodeからこのエラーコードを飛び出しました。OS X用です。これを解決するにはどうすればよいですか?

2013-03-11 20:39:12.804 Project1[2038:303] Unable to simultaneously satisfy constraints:
   (
        "<NSAutoresizingMaskLayoutConstraint:0x101a1e8e0 h=--& v=--& H:    [NSView:0x100130d40(0)]>",
    "<NSLayoutConstraint:0x10013a5d0 H:[NSScrollView:0x1001310b0]-(17)-|   (Names: '|':NSView:0x100130d40 )>",
    "<NSLayoutConstraint:0x1001382c0 H:|-(17)-[NSScrollView:0x1001310b0]   (Names: '|':NSView:0x100130d40 )>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x10013a5d0 H:[NSScrollView:0x1001310b0]-(17)-|   (Names: '|':NSView:0x100130d40 )>

Set the NSUserDefault NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have -[NSWindow visualizeConstraints:] automatically called when this happens.  And/or, break on objc_exception_throw to catch this in the debugger.
2013-03-11 20:39:12.806 Project1[2038:303] Unable to simultaneously satisfy constraints:
(
    "<NSAutoresizingMaskLayoutConstraint:0x101a1e9a0 h=--& v=--& V:[NSView:0x100130d40(0)]>",
    "<NSLayoutConstraint:0x10013a630 V:|-(102)-[NSScrollView:0x1001310b0]   (Names: '|':NSView:0x100130d40 )>",
    "<NSLayoutConstraint:0x100138320 V:[NSScrollView:0x1001310b0]-(17)-|   (Names: '|':NSView:0x100130d40 )>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x100138320 V:[NSScrollView:0x1001310b0]-(17)-|   (Names: '|':NSView:0x100130d40 )>

Set the NSUserDefault NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have -[NSWindow visualizeConstraints:] automatically called when this happens.  And/or, break on objc_exception_throw to catch this in the debugger.
4

1 に答える 1

1

他の制約と矛盾する独自の自動レイアウト制約を設定しました。

これは次のように発生します。

2 つのボタンの差を 10 に設定し、ウィンドウの境界から 20 に設定した場合。しかし、ボタンはウィンドウの境界から 20 ではなく、他の制約が 10 であるため、境界に向かって移動できません。

ここに画像の説明を入力

于 2013-03-11T12:50:08.350 に答える