getting weird log message on console(AutoLayout) - ios

Hiii Guys,
I have a view with 600*450 size, now i put a collection view in a view with 600*430 size. when i am running application i am getting this weird message on console
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. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x600000285960 V:|-(0)-[UICollectionView:0x7fb133860800] (Names: '|':UIView:0x60000019df60 )>",
"<NSLayoutConstraint:0x600000285a50 V:[UICollectionView:0x7fb133860800]-(20)-| (Names: '|':UIView:0x60000019df60 )>",
"<NSLayoutConstraint:0x600000285dc0 V:[_UILayoutGuide:0x6000001b5b60]-(0)-[UIView:0x60000019dc20]>",
"<NSLayoutConstraint:0x600000285e10 UIView:0x60000019dc20.height == 0.25*UIView:0x60000019db50.height>",
"<NSLayoutConstraint:0x6000002860e0 V:[_UILayoutGuide:0x6000001b5b60]-(0)-[UIView:0x60800019d5a0]>",
"<NSLayoutConstraint:0x600000286180 UIView:0x60000019df60.bottom == UIView:0x60000019ddc0.bottom>",
"<NSLayoutConstraint:0x600000286220 UIView:0x60000019df60.top == UIView:0x60800019d5a0.top>",
"<NSLayoutConstraint:0x600000286540 UIView:0x60000019dcf0.height == 0.25*UIView:0x60000019db50.height>",
"<NSLayoutConstraint:0x600000286590 V:[UIView:0x60000019dc20]-(0)-[UIView:0x60000019dcf0]>",
"<NSLayoutConstraint:0x6000002867c0 UIView:0x60000019ddc0.height == 0.25*UIView:0x60000019db50.height>",
"<NSLayoutConstraint:0x6000002868b0 V:[UIView:0x60000019dcf0]-(0)-[UIView:0x60000019ddc0]>",
"<NSLayoutConstraint:0x600000288d40 'UIView-Encapsulated-Layout-Height' V:[UIView:0x60000019db50(0)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600000285a50 V:[UICollectionView:0x7fb133860800]-(20)-| (Names: '|':UIView:0x60000019df60 )>
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.
i don't know what to do.
I have applied this 4 constraints to UICollectionView.

This occur because few constraint you have added is not required so it is better to select the view and then after Choose Reset to suggested constraint .
and if after this if constraint not up to mark then better to look for each control constraint and check which constraint showing mark (yellow)and try to remove manually and then add.
Hope it helps.

Related

How to debug AutoLayout Constraints?

I am new to iOS Development. Whenever I run my App, I get this conflicting constraints error. Can you please suggest me something about how to debug this issue?
2016-07-13 12:53:51.186 Calculator[4458:50017] 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.
(
"<_UILayoutSupportConstraint:0x7fcaf3c5e670 V:[_UILayoutGuide:0x7fcaf3c62a80(0)]>",
"<_UILayoutSupportConstraint:0x7fcaf3c5c060 _UILayoutGuide:0x7fcaf3c62a80.bottom == UIView:0x7fcaf3c54390.bottom>",
"<NSLayoutConstraint:0x7fcaf3c54b00 UIImageView:0x7fcaf3c54c70.width == UIImageView:0x7fcaf3c54c70.height>",
"<NSLayoutConstraint:0x7fcaf3c633d0 V:|-(0)-[UIImageView:0x7fcaf3c54c70] (Names: '|':UIView:0x7fcaf3c54390 )>",
"<NSLayoutConstraint:0x7fcaf3c63420 H:[UIImageView:0x7fcaf3c54c70]-(0)-| (Names: '|':UIView:0x7fcaf3c54390 )>",
"<NSLayoutConstraint:0x7fcaf3c63470 H:|-(0)-[UIImageView:0x7fcaf3c54c70] (Names: '|':UIView:0x7fcaf3c54390 )>",
"<NSLayoutConstraint:0x7fcaf3c63560 V:[UIImageView:0x7fcaf3c54c70]-(0)-[_UILayoutGuide:0x7fcaf3c62a80]>",
"<NSLayoutConstraint:0x7fcaf3c67e50 'UIView-Encapsulated-Layout-Height' V:[UIView:0x7fcaf3c54390(736)]>",
"<NSLayoutConstraint:0x7fcaf3c61230 'UIView-Encapsulated-Layout-Width' H:[UIView:0x7fcaf3c54390(414)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7fcaf3c54b00 UIImageView:0x7fcaf3c54c70.width == UIImageView:0x7fcaf3c54c70.height>
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.
It seems as if you have a constraint added which is being counter acted by another constraint.
Normally if you right click you're able to get the 'Suggested Constraints' try using them and see if it works!
edit:

iOS, Animating view's constraints causes error "Unable to simultaneously satisfy constraints"

I am attemptin to animate one of my container view's constraints. In IB, the the view is constrained fine without errors or warnings. When I call these methods in viewDidLoad, to change the views y coordinate like so:
self.queueContainerYConst.constant += 550;
[self.view layoutIfNeeded];
I get the message for "unable to satisfy constraints...". While running the app, my animations and UI look fine, everything is appears to be constrained properly. Here is the entire message I get in the console.
2015-05-03 14:17:52.668 Streamacy[15914:3333195] 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. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x155a95c0 V:|-(614)-[UIView:0x155a83a0] (Names: '|':UIView:0x155a91b0 )>",
"<NSLayoutConstraint:0x155a95f0 V:[UIView:0x155a83a0]-(0)-| (Names: '|':UIView:0x155a91b0 )>",
"<NSLayoutConstraint:0x155af080 'UIView-Encapsulated-Layout-Height' V:[UIView:0x155a91b0(568)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x155a95f0 V:[UIView:0x155a83a0]-(0)-| (Names: '|':UIView:0x155a91b0 )>
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.
2015-05-03 14:17:52.684 Streamacy[15914:3333195] 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. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x1566a2a0 UIView:0x156a1900.width == UIView:0x156a1900.height>",
"<NSLayoutConstraint:0x156a9000 V:[UIView:0x156a1900]-(32)-[UIProgressView:0x15688f30]>",
"<NSLayoutConstraint:0x156a0df0 V:[UIProgressView:0x15688f30]-(11)-[MarqueeLabel:0x156a7360'Awake']>",
"<NSLayoutConstraint:0x156a0eb0 UIView:0x1569dd90.trailingMargin == UIView:0x156a1900.trailing + 99>",
"<NSLayoutConstraint:0x156a0f10 UIView:0x156a1900.leading == UIView:0x1569dd90.leadingMargin + 99>",
"<NSLayoutConstraint:0x156a0f40 UIView:0x156a1900.top == UIView:0x1569dd90.topMargin - 46>",
"<NSLayoutConstraint:0x156a92f0 V:[UILabel:0x156a6ea0'Tycho']-(17)-[UITableView:0x1587a000]>",
"<NSLayoutConstraint:0x156a93b0 V:[MarqueeLabel:0x156a7360'Awake']-(2)-[UILabel:0x156a6ea0'Tycho']>",
"<NSLayoutConstraint:0x156a94d0 V:[UITableView:0x1587a000]-(0)-[_UILayoutGuide:0x156a8b20]>",
"<_UILayoutSupportConstraint:0x156a4cf0 V:[_UILayoutGuide:0x156a8b20(0)]>",
"<_UILayoutSupportConstraint:0x156a4810 _UILayoutGuide:0x156a8b20.bottom == UIView:0x1569dd90.bottom>",
"<NSLayoutConstraint:0x156b6070 'UIView-Encapsulated-Layout-Width' H:[UIView:0x1569dd90(320)]>",
"<NSLayoutConstraint:0x156b60a0 'UIView-Encapsulated-Layout-Height' V:[UIView:0x1569dd90(0)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x1566a2a0 UIView:0x156a1900.width == UIView:0x156a1900.height>
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.
2015-05-03 14:17:52.688 Streamacy[15914:3333195] 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. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x156a9000 V:[UIView:0x156a1900]-(32)-[UIProgressView:0x15688f30]>",
"<NSLayoutConstraint:0x156a0df0 V:[UIProgressView:0x15688f30]-(11)-[MarqueeLabel:0x156a7360'Awake']>",
"<NSLayoutConstraint:0x156a0f40 UIView:0x156a1900.top == UIView:0x1569dd90.topMargin - 46>",
"<NSLayoutConstraint:0x156a92f0 V:[UILabel:0x156a6ea0'Tycho']-(17)-[UITableView:0x1587a000]>",
"<NSLayoutConstraint:0x156a93b0 V:[MarqueeLabel:0x156a7360'Awake']-(2)-[UILabel:0x156a6ea0'Tycho']>",
"<NSLayoutConstraint:0x156a94d0 V:[UITableView:0x1587a000]-(0)-[_UILayoutGuide:0x156a8b20]>",
"<_UILayoutSupportConstraint:0x156a4cf0 V:[_UILayoutGuide:0x156a8b20(0)]>",
"<_UILayoutSupportConstraint:0x156a4810 _UILayoutGuide:0x156a8b20.bottom == UIView:0x1569dd90.bottom>",
"<NSLayoutConstraint:0x156b60a0 'UIView-Encapsulated-Layout-Height' V:[UIView:0x1569dd90(0)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x156a9000 V:[UIView:0x156a1900]-(32)-[UIProgressView:0x15688f30]>
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.
It appears that everything inside my container view gets misplaced, why?. Am I animating/changing my view improperly?
You're view is over constrained. You have a constraint of 614 to the top and 0 to the bottom of its superview, but the height of that view is 568, so those numbers don't add up. It would be better to only have one of those vertical constraints and a fixed hight for your view if that works for your purposes (that "fixed" height could be made relative to the superview's height if you ned it to adjust for different screen sizes).

NSLayoutConstrain error when using JSQMessagesViewController

Then view is showed below:
And I scroll down and scroll up many times , there are errors coming.
The code is mostly as same as the sample code in the demo.
2015-05-18 10:15:16.907 HiPDA V2[29096:948402] 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. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x7fa810d4ce20 V: [JSQMessagesLabel:0x7fa810d4ca80(20)]>",
"<NSLayoutConstraint:0x7fa810d4dc40 V:[JSQMessagesLabel:0x7fa810d4d5f0(20)]>",
"<NSLayoutConstraint:0x7fa810d54910 V:[JSQMessagesLabel:0x7fa810d54670(0)]>",
"<NSLayoutConstraint:0x7fa810d55010 V:|-(0)-[JSQMessagesLabel:0x7fa810d4ca80] (Names: '|':UIView:0x7fa810d4c900 )>",
"<NSLayoutConstraint:0x7fa810d55100 V: [JSQMessagesLabel:0x7fa810d4ca80]-(0)-[JSQMessagesLabel:0x7fa810d4d5f0]>",
"<NSLayoutConstraint:0x7fa810d551a0 V:[JSQMessagesLabel:0x7fa810d4d5f0]-(0)-[UIView:0x7fa810d4e1b0]>",
"<NSLayoutConstraint:0x7fa810d55330 V:[JSQMessagesLabel:0x7fa810d54670]-(0)-| (Names: '|':UIView:0x7fa810d4c900 )>",
"<NSLayoutConstraint:0x7fa810d55380 V:[UIView:0x7fa810d4e1b0]-(0)-[JSQMessagesLabel:0x7fa810d54670]>",
"<NSAutoresizingMaskLayoutConstraint:0x7fa8131f45d0 h=--& v=--& V:[UIView:0x7fa810d4c900(38)]>"
)
W ill attempt to recover by breaking constraint
<NSLayoutConstraint:0x7fa810d4dc40 V: [JSQMessagesLabel:0x7fa810d4d5f0(20)]>
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.

Auto Layout issue with collection view cell

I am trying to create a somewhat basic layout and am having the classic "Unable to simultaneously satisfy constraints" problem. After an hour on it I cannot track it down.
Here is the layout in interface builder:
Please note that no constraints are being added/modified in code. Everything is happening in IB.
Here is the error message I am getting:
2015-03-07 19:13:33.044 TwitterStats[4326:209207] 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. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x7f888ad8b700 H:[UIImageView:0x7f888ad8ce40(90)]>",
"<NSLayoutConstraint:0x7f888ad8f910 H:|-(8)-[UIImageView:0x7f888ad8ce40] (Names: '|':UIView:0x7f888ad8cd70 )>",
"<NSLayoutConstraint:0x7f888ad8fb40 UIView:0x7f888ad8cd70.trailingMargin == UILabel:0x7f888ad87790'#username'.trailing + 10>",
"<NSLayoutConstraint:0x7f888ad8fb90 H:[UIImageView:0x7f888ad8ce40]-(14)-[UILabel:0x7f888ad87790'#username']>",
"<NSAutoresizingMaskLayoutConstraint:0x7f888af29690 h=--& v=--& H:[UIView:0x7f888ad8cd70(50)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7f888ad8b700 H:[UIImageView:0x7f888ad8ce40(90)]>
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.
2015-03-07 19:13:33.045 TwitterStats[4326:209207] 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. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x7f888ad8b210 V:[UIImageView:0x7f888ad8ce40(90)]>",
"<NSLayoutConstraint:0x7f888ad8f450 V:[UIButton:0x7f888ad8f150'Unfollow'(52)]>",
"<NSLayoutConstraint:0x7f888ad8f8c0 V:|-(8)-[UIImageView:0x7f888ad8ce40] (Names: '|':UIView:0x7f888ad8cd70 )>",
"<NSLayoutConstraint:0x7f888ad8fa00 V:[UIImageView:0x7f888ad8ce40]-(10)-[UITableView:0x7f888b840000]>",
"<NSLayoutConstraint:0x7f888ad8fc30 V:[UITableView:0x7f888b840000]-(0)-[UIButton:0x7f888ad8f150'Unfollow']>",
"<NSLayoutConstraint:0x7f888ad8fcd0 V:[UIButton:0x7f888ad8f150'Unfollow']-(0)-| (Names: '|':UIView:0x7f888ad8cd70 )>",
"<NSAutoresizingMaskLayoutConstraint:0x7f888af3cb10 h=--& v=--& V:[UIView:0x7f888ad8cd70(50)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7f888ad8b210 V:[UIImageView:0x7f888ad8ce40(90)]>
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.
2015-03-07 19:13:33.073 TwitterStats[4326:209207] 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. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x7f888ad8f450 V:[UIButton:0x7f888ad8f150'Unfollow'(52)]>",
"<NSLayoutConstraint:0x7f888ad8f8c0 V:|-(8)-[UIImageView:0x7f888ad8ce40] (Names: '|':UIView:0x7f888ad8cd70 )>",
"<NSLayoutConstraint:0x7f888ad8fa00 V:[UIImageView:0x7f888ad8ce40]-(10)-[UITableView:0x7f888b840000]>",
"<NSLayoutConstraint:0x7f888ad8fc30 V:[UITableView:0x7f888b840000]-(0)-[UIButton:0x7f888ad8f150'Unfollow']>",
"<NSLayoutConstraint:0x7f888ad8fcd0 V:[UIButton:0x7f888ad8f150'Unfollow']-(0)-| (Names: '|':UIView:0x7f888ad8cd70 )>",
"<NSAutoresizingMaskLayoutConstraint:0x7f888af3cb10 h=--& v=--& V:[UIView:0x7f888ad8cd70(50)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7f888ad8f450 V:[UIButton:0x7f888ad8f150'Unfollow'(52)]>
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.
2015-03-07 19:13:33.111 TwitterStats[4326:209207] 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. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x7f888ac441e0 H:[UIImageView:0x7f888ac87610(90)]>",
"<NSLayoutConstraint:0x7f888ac4f8e0 H:|-(8)-[UIImageView:0x7f888ac87610] (Names: '|':UIView:0x7f888ac7f2c0 )>",
"<NSLayoutConstraint:0x7f888ac8cd20 UIView:0x7f888ac7f2c0.trailingMargin == UILabel:0x7f888ac52b00'#username'.trailing + 10>",
"<NSLayoutConstraint:0x7f888ac48b90 H:[UIImageView:0x7f888ac87610]-(14)-[UILabel:0x7f888ac52b00'#username']>",
"<NSAutoresizingMaskLayoutConstraint:0x7f888af3e030 h=--& v=--& H:[UIView:0x7f888ac7f2c0(50)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7f888ac441e0 H:[UIImageView:0x7f888ac87610(90)]>
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.
2015-03-07 19:13:33.113 TwitterStats[4326:209207] 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. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x7f888ac29530 V:[UIImageView:0x7f888ac87610(90)]>",
"<NSLayoutConstraint:0x7f888ac41d40 V:[UIButton:0x7f888ac53e90'Unfollow'(52)]>",
"<NSLayoutConstraint:0x7f888ac4f890 V:|-(8)-[UIImageView:0x7f888ac87610] (Names: '|':UIView:0x7f888ac7f2c0 )>",
"<NSLayoutConstraint:0x7f888ac8b790 V:[UIImageView:0x7f888ac87610]-(10)-[UITableView:0x7f888b035400]>",
"<NSLayoutConstraint:0x7f888ac48c30 V:[UITableView:0x7f888b035400]-(0)-[UIButton:0x7f888ac53e90'Unfollow']>",
"<NSLayoutConstraint:0x7f888ac8ae40 V:[UIButton:0x7f888ac53e90'Unfollow']-(0)-| (Names: '|':UIView:0x7f888ac7f2c0 )>",
"<NSAutoresizingMaskLayoutConstraint:0x7f888af2ba00 h=--& v=--& V:[UIView:0x7f888ac7f2c0(50)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7f888ac29530 V:[UIImageView:0x7f888ac87610(90)]>
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.
2015-03-07 19:13:33.114 TwitterStats[4326:209207] 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. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x7f888ac41d40 V:[UIButton:0x7f888ac53e90'Unfollow'(52)]>",
"<NSLayoutConstraint:0x7f888ac4f890 V:|-(8)-[UIImageView:0x7f888ac87610] (Names: '|':UIView:0x7f888ac7f2c0 )>",
"<NSLayoutConstraint:0x7f888ac8b790 V:[UIImageView:0x7f888ac87610]-(10)-[UITableView:0x7f888b035400]>",
"<NSLayoutConstraint:0x7f888ac48c30 V:[UITableView:0x7f888b035400]-(0)-[UIButton:0x7f888ac53e90'Unfollow']>",
"<NSLayoutConstraint:0x7f888ac8ae40 V:[UIButton:0x7f888ac53e90'Unfollow']-(0)-| (Names: '|':UIView:0x7f888ac7f2c0 )>",
"<NSAutoresizingMaskLayoutConstraint:0x7f888af2ba00 h=--& v=--& V:[UIView:0x7f888ac7f2c0(50)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7f888ac41d40 V:[UIButton:0x7f888ac53e90'Unfollow'(52)]>
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.
The strange thing is this constraint <NSAutoresizingMaskLayoutConstraint:0x7f888af2ba00 h=--& v=--& V:[UIView:0x7f888ac7f2c0(50)]>, I don't get where it's coming from.
Any idea on how to solve these issues?
I had same problem yesterday. The NSAutoresizingMaskLayoutConstraint you mentioned was not the problem. I could not figure out where that constraint comes from, but it seems to be normal for collection view cells.
The problem is that the constraints cannot be satisfied. Take a look at the first set of constraints that are not working:
"<NSLayoutConstraint:0x7f888ad8b700 H:[UIImageView:0x7f888ad8ce40(90)]"
"<NSLayoutConstraint:0x7f888ad8f910 H:|-(8)-[UIImageView:0x7f888ad8ce40] (Names: '|':UIView:0x7f888ad8cd70 )>"
"<NSLayoutConstraint:0x7f888ad8fb40 UIView:0x7f888ad8cd70.trailingMargin == UILabel:0x7f888ad87790'#username'.trailing + 10>"
"<NSLayoutConstraint:0x7f888ad8fb90 H:[UIImageView:0x7f888ad8ce40]-(14)-[UILabel:0x7f888ad87790'#username']>"
You have 8 points from the left edge to the image view.
The image view is 90 points wide. You have 14 points from the image view to the username. Then the username is constrained to the trailing margin with 10 points space.
Username is a UILabel and has intrinsic size. Suppose that for a given user it required 40 points to display the username. Your constraints would result in a screen width of 8 + 90 + 14 + 40 + 10 = 162. That would be a very narrow screen! These constraints cannot be satisfied.
The thing to do here is remove this trailing constraint:
"<NSLayoutConstraint:0x7f888ad8fb40 UIView:0x7f888ad8cd70.trailingMargin == UILabel:0x7f888ad87790'#username'.trailing + 10>"
If you are really concerned that the username could be too long, you could try keeping this constraint, but changing it from EQUALS 10 to GREATER THAN OR EQUAL to 10.
I had a similar problem with a UICollectionView in a Storyboard.
The cause for this error is the size of the contentView of the CollectionViewCell. It uses the default size which is (50.0, 50.0). This might be an InterfaceBuilder-Bug.
A fix is to change the priority for your imageView.width (90) and the buttons width (52) to 999.

Autolayout constraints warning “Will attempt to recover by breaking constraint”

I am trying to implement a feed of news (somehow like instagram without comments or likes). It works, but xcode keep showing this error. I tried change all the constraints, however, I cant get to work. The tableview has a height of 475 and the image has the height of 400, leaving 75 for the white area with labels.
I did use
self.tableView.estimatedRowHeight = 475;
self.tableView.rowHeight = UITableViewAutomaticDimension;
Any help?
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. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x174096530 UIImageView:0x1743e9000.top == UITableViewCellContentView:0x17418af80.topMargin + 13>",
"<NSLayoutConstraint:0x1740977f0 V:[PFImageView:0x1743e8e00]-(0)-| (Names: '|':UITableViewCellContentView:0x17418af80 )>",
"<NSLayoutConstraint:0x174097840 V:[UIImageView:0x1743e9000]-(24)-[PFImageView:0x1743e8e00]>",
"<NSLayoutConstraint:0x174097890 H:|-(0)-[PFImageView:0x1743e8e00] (Names: '|':UITableViewCellContentView:0x17418af80 )>",
"<NSLayoutConstraint:0x174097930 H:[PFImageView:0x1743e8e00]-(0)-| (Names: '|':UITableViewCellContentView:0x17418af80 )>",
"<NSLayoutConstraint:0x174097ac0 PFImageView:0x1743e8e00.width == PFImageView:0x1743e8e00.height>",
"<NSLayoutConstraint:0x174097b60 V:[UIImageView:0x1743e9000(30)]>",
"<NSLayoutConstraint:0x174092ed0 'UIView-Encapsulated-Layout-Width' H:[UITableViewCellContentView:0x17418af80(375)]>",
"<NSLayoutConstraint:0x174092f20 'UIView-Encapsulated-Layout-Height' V:[UITableViewCellContentView:0x17418af80(44)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x174097b60 V:[UIImageView:0x1743e9000(30)]>
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.
I actually solved the problem changing the priority from the bottom of the image constrain to 750. Thanks for the help.

Resources