2016-08-28 2 views
1

Ich möchte nur den Tabellenansichtsrahmen in viewwilllappear mit easyPeasy für das automatische Layout ändern.Ich kann den Tabellenansichtsrahmen nicht ändern

Ich habe Kollektion und Tableview in einer viewcontroller.I'm in der ersten offenen beide them.But mit Ich verstecke Kollektion und versuchen Tableview y Punkt auf 0.

override func viewWillAppear(animated: Bool) { 
     super.viewWillAppear(true) 
     self.collectionView.hidden = true 
     self.tableView <- [ 
      Top(0).to((self.navigationController?.navigationBar)!, .Bottom) 
     ] 
    } 

Und es ist zu bewegen gib mir diesen Fehler.

Unable to simultaneously satisfy constraints. 
    Probably at least one of the constraints in the following list is one you don't want. 
    Try this: 
     (1) look at each constraint and try to figure out which you don't expect; 
     (2) find the code that added the unwanted constraint or constraints and fix it. 
(
    "<NSLayoutConstraint:0x14c06f370 UIImageView:0x14c1c2d30.width == 40>", 
    "<NSLayoutConstraint:0x14c1e5ff0 UIImageView:0x14c1c2d30.width == 22>" 
) 

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x14c06f370 UIImageView:0x14c1c2d30.width == 40> 

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. 
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful. 
nil 
2016-08-29 01:06:37.034 Bons[985:280487] Unable to simultaneously satisfy constraints. 
    Probably at least one of the constraints in the following list is one you don't want. 
    Try this: 
     (1) look at each constraint and try to figure out which you don't expect; 
     (2) find the code that added the unwanted constraint or constraints and fix it. 
(
    "<NSLayoutConstraint:0x14c0e29d0 UIImageView:0x14c1e9ee0.width == 40>", 
    "<NSLayoutConstraint:0x14c1e7f00 UIImageView:0x14c1e9ee0.width == 22>" 
) 

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x14c0e29d0 UIImageView:0x14c1e9ee0.width == 40> 

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. 
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful. 
nil 
2016-08-29 01:06:37.044 Bons[985:280487] Unable to simultaneously satisfy constraints. 
    Probably at least one of the constraints in the following list is one you don't want. 
    Try this: 
     (1) look at each constraint and try to figure out which you don't expect; 
     (2) find the code that added the unwanted constraint or constraints and fix it. 
(
    "<NSLayoutConstraint:0x14c0f5c50 UIImageView:0x14c0f4a10.width == 40>", 
    "<NSLayoutConstraint:0x14c1e7fc0 UIImageView:0x14c0f4a10.width == 22>" 
) 

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x14c0f5c50 UIImageView:0x14c0f4a10.width == 40> 

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. 
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful. 
nil 
2016-08-29 01:06:37.053 Bons[985:280487] Unable to simultaneously satisfy constraints. 
    Probably at least one of the constraints in the following list is one you don't want. 
    Try this: 
     (1) look at each constraint and try to figure out which you don't expect; 
     (2) find the code that added the unwanted constraint or constraints and fix it. 
(
    "<NSLayoutConstraint:0x14c0f5930 UILabel:0x14c0f5020.centerY == UITableViewCellContentView:0x14c0f3c60.centerY>", 
    "<NSLayoutConstraint:0x14c0f59d0 UIImageView:0x14c0f4a10.top == UIImageView:0x14c0f5600.top + 5>", 
    "<NSLayoutConstraint:0x14c0f5a70 UIImageView:0x14c0f4a10.centerY == UILabel:0x14c0f5020.centerY>", 
    "<NSLayoutConstraint:0x14c0f5b10 UITableViewCellContentView:0x14c0f3c60.bottomMargin == UIImageView:0x14c0f5600.bottom - 1>", 
    "<NSLayoutConstraint:0x14c0f5bb0 UIImageView:0x14c0f5600.height == 38>", 
    "<NSLayoutConstraint:0x14c1f5330 UIImageView:0x14c0f4a10.height == 22>", 
    "<NSLayoutConstraint:0x14c1f4cc0 UITableViewCellContentView:0x14c0f3c60.height == 54>" 
) 

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x14c0f5bb0 UIImageView:0x14c0f5600.height == 38> 

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. 
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful. 
2016-08-29 01:06:37.062 Bons[985:280487] Unable to simultaneously satisfy constraints. 
    Probably at least one of the constraints in the following list is one you don't want. 
    Try this: 
     (1) look at each constraint and try to figure out which you don't expect; 
     (2) find the code that added the unwanted constraint or constraints and fix it. 
(
    "<NSLayoutConstraint:0x14c0efad0 UILabel:0x14c0f07b0.centerY == UITableViewCellContentView:0x14c1e85d0.centerY>", 
    "<NSLayoutConstraint:0x14c0e25a0 UIImageView:0x14c1e9ee0.top == UIImageView:0x14c0ef890.top + 5>", 
    "<NSLayoutConstraint:0x14c0e2640 UIImageView:0x14c1e9ee0.centerY == UILabel:0x14c0f07b0.centerY>", 
    "<NSLayoutConstraint:0x14c0e2890 UITableViewCellContentView:0x14c1e85d0.bottomMargin == UIImageView:0x14c0ef890.bottom - 1>", 
    "<NSLayoutConstraint:0x14c0e2930 UIImageView:0x14c0ef890.height == 38>", 
    "<NSLayoutConstraint:0x14c0f1c90 UIImageView:0x14c1e9ee0.height == 22>", 
    "<NSLayoutConstraint:0x14c1f87a0 UITableViewCellContentView:0x14c1e85d0.height == 54>" 
) 

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x14c0e2930 UIImageView:0x14c0ef890.height == 38> 

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. 
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful. 
2016-08-29 01:06:37.070 Bons[985:280487] Unable to simultaneously satisfy constraints. 
    Probably at least one of the constraints in the following list is one you don't want. 
    Try this: 
     (1) look at each constraint and try to figure out which you don't expect; 
     (2) find the code that added the unwanted constraint or constraints and fix it. 
(
    "<NSLayoutConstraint:0x14c089ce0 UILabel:0x14c0c8050.centerY == UITableViewCellContentView:0x14c06e390.centerY>", 
    "<NSLayoutConstraint:0x14c089d80 UIImageView:0x14c1c2d30.top == UIImageView:0x14c071f20.top + 5>", 
    "<NSLayoutConstraint:0x14c089e20 UIImageView:0x14c1c2d30.centerY == UILabel:0x14c0c8050.centerY>", 
    "<NSLayoutConstraint:0x14c06f230 UITableViewCellContentView:0x14c06e390.bottomMargin == UIImageView:0x14c071f20.bottom - 1>", 
    "<NSLayoutConstraint:0x14c06f2d0 UIImageView:0x14c071f20.height == 38>", 
    "<NSLayoutConstraint:0x14c1e5560 UIImageView:0x14c1c2d30.height == 22>", 
    "<NSLayoutConstraint:0x14c211d80 UITableViewCellContentView:0x14c06e390.height == 54>" 
) 

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x14c06f2d0 UIImageView:0x14c071f20.height == 38> 
+0

Alle Drittanbieter-Bibliothek ist ein zweischneidiges Schwert. Manche Dinge werden leichter, andere schwieriger. Dinge zu debuggen, die nicht funktionieren, ist oft sehr schmerzhaft. Mein Rat ist, wenn die Dokumentation für die Bibliothek Ihnen nicht weiterhilft, dann ziehen Sie die Bibliothek und verwenden Sie die native Apple API zum Erstellen und Bearbeiten Ihrer Einschränkungen. –

+0

Ich habe das Framework von Drittanbietern nicht verwendet und es erneut versucht. Es ist fehlgeschlagen. Gab mir die gleiche Ausgabe –

Antwort

1

Das Problem besteht darin, dass Sie versuchen, die Beziehung zwischen Elementen herzustellen, die nicht in derselben Ansicht enthalten sind. Stattdessen können Sie:

override func viewWillAppear(animated: Bool) { 
    super.viewWillAppear(true) 
    self.collectionView.hidden = true 
    self.tableView <- [ 
     Top(0).to(self.topLayoutGuide)) 
    ] 
} 
Verwandte Themen