I keep getting 'Unable to simultaneously satisfy constraints' exceptions (Xcode 5, iOS 7, both device and simulator), where one of the constraints in the list is something like this:
"<NSLayoutConstraint:0x165b23d0 'UIView-Encapsulated-Layout-Width'
H:[StoryPlayerCell:0x165affc0(0)]>"
I did not set this constraint myself. It's also not an NSAutoresizingMaskLayoutConstraint
.
But where does it come from? And how can I get rid of it?
I have no idea.
And I can't find anything about 'UIView-Encapsulated-Layout-Width'
in the Apple's documentation.
Even the Google search returns nothing at all.
Any suggestions?
PS: I'm using this cell in a UICollectionView
with a custom subclass of UICollectionViewFlowLayout
. Maybe the 'Encapsulated-Layout'
part has something to do with this?
A quick and nice fix, is to assign 999
priority value to the custom constraints with high priority. The encapsulated & auto-generated constraints should dominate with higher priority than your constraints.