1
votes

Am getting below error and m,y custom annotation view is not displaying in my iPhone5s device but its displaying in my iPhone6+ device,

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) ( "NSAutoresizingMaskLayoutConstraint:0x12afb36b0 h=--& v=--& H:[MKSmallCalloutView:0x12c0021d0(0)]",
"NSLayoutConstraint:0x12aede9f0 H:|-(0)-[UIView:0x12c008f70] (Names: '|':MKSmallCalloutView:0x12c0021d0 )",
"NSLayoutConstraint:0x12aee0ca0 H:[UIView:0x12c008f70]-(0)-[_MKCalloutAccessoryWrapperView:0x12afc1090]",
"NSLayoutConstraint:0x12aedec30 H:[_MKCalloutAccessoryWrapperView:0x12afc1090]-(12)-[UILabel:0x12c003750'\U00a0']",
"NSLayoutConstraint:0x12aededc0 UIView:0x12c009180.trailing == MKSmallCalloutView:0x12c0021d0.trailing",
"NSLayoutConstraint:0x12aedeeb0 _MKCalloutAccessoryWrapperView:0x12afc6860.trailing == UIView:0x12c009180.leading",
"NSLayoutConstraint:0x12aedef00 UILabel:0x12c003750'\U00a0'.trailing <= _MKCalloutAccessoryWrapperView:0x12afc6860.leading - 12>" )

Will attempt to recover by breaking constraint

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in may also be helpful.

2016-01-27 13:15:49.348 OK[2390:779352] Unable to simultaneously satisfy constraints.

Please help me to get out of this issue.

1
You probably should post the constraints (and describe what you want to achieve). If you set them up in code - paste it. If in Storyboard, do at least the screenshots. - Nat

1 Answers

0
votes

I had the same issue because the center of the Map was always considered the center of the self.view and not the center of the mapView. You need to set the center of your mapview.