Advertisement
Guest User

Untitled

a guest
Feb 27th, 2015
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. var dict = ["txtHome" : txtHome]
  2. self.view.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:|-[txtHome]-|", options: nil, metrics: nil, views: dict))
  3. self.view.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("V:|-(>=90,<=100)-[txtHome(20)]-|", options: nil, metrics: nil, views: dict))
  4.  
  5. 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)
  6. (
  7. "<NSLayoutConstraint:0x7966d210 V:|-(<=100)-[UITextField:0x79666440] (Names: '|':UIView:0x796637d0 )>",
  8. "<NSLayoutConstraint:0x7966d280 V:[UITextField:0x79666440(20)]>",
  9. "<NSLayoutConstraint:0x7966d240 UIView:0x796637d0.bottomMargin == UITextField:0x79666440.bottom>",
  10. "<NSLayoutConstraint:0x7966e880 'UIView-Encapsulated-Layout-Height' V:[UIView:0x796637d0(480)]>"
  11. )
  12.  
  13. Will attempt to recover by breaking constraint
  14. <NSLayoutConstraint:0x7966d240 UIView:0x796637d0.bottomMargin == UITextField:0x79666440.bottom>
  15.  
  16. Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
  17. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement