Error in constraint with one view inside another

1

I have a login view with a label and a text box. In turn, this view is inside the main view of the view. When executing the application it does not show me the view with login and I get the following warning message:

'[LayoutConstraints] Unable to simultaneously satisfy constraints.     Probably at least one of the constraints in the following list is one you do not want.     Try this:         (1) look at each constraint and try to figure out which you do not expect;         (2) find the code that added the unwanted constraint or constraints and fix it. (     "< _UILayoutSupportConstraint: 0x17009a770 _UILayoutGuide: 0x10050e780.height == 20 (active) >",     "< _UILayoutSupportConstraint: 0x170099ff0 V: | - (0) - [_ UILayoutGuide: 0x10050e780] (active, names: '|': UIView: 0x10050d2f0) >",     "< _UILayoutSupportConstraint: 0x17009a810 _UILayoutGuide: 0x10050eb30.height == 0 (active) >",     "< _UILayoutSupportConstraint: 0x17009a7c0 _UILayoutGuide: 0x10050eb30.bottom == UIView: 0x10050d2f0.bottom (active) >",     "",     "",     "" )

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. '

The constraints I have set as in the image that I attached:

    
asked by Popularfan 30.03.2017 в 18:00
source

1 answer

1

I can not comment, so take this as a comment:

You have too many Constraints that generate conflict.

If you use the leading space, do not use the trailing space for the same combination of views.

You should check the documentation for AutoLayout

Also to be able to offer you more help, it would be convenient to include a capture of the visual layout where the constraints appear (in the Xcode editor you can mark the constraints visible)

    
answered by 31.03.2017 / 13:00
source