chronotruck / FlagPhoneNumber

A formatted phone number UITextField with country flag picker.
Apache License 2.0
437 stars 317 forks source link

Unable to simultaneously satisfy constraints. #176

Open summonerriftofficial opened 3 years ago

summonerriftofficial commented 3 years ago

Describe the bug problem with auto layout for select flag

To Reproduce Steps to reproduce the behavior:

  1. Open app using iPhone 7 ios 12.4
  2. make the direction right to left
  3. See error

Expected behavior flag button works and select country

Screenshots

Screen Shot 2020-12-14 at 12 59 21 PM

Smartphone (please complete the following information):

Additional context

[LayoutConstraints] 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:0x6000035f98b0 h=--& v=--& UIView:0x7fd7a3e2bc50.width == 0 (active)>", "<NSLayoutConstraint:0x6000035e9c70 UIButton:0x7fd7a3e11e60.width == 32 (active)>", "<NSLayoutConstraint:0x6000035e9d60 H:|-(0)-[UIButton:0x7fd7a3e11e60] (active, names: '|':UIView:0x7fd7a3e2bc50 )>", "<NSLayoutConstraint:0x6000035e9db0 H:[UIButton:0x7fd7a3e11e60]-(0)-[UITextField:0x7fd7a4814c00] (active)>", "<NSLayoutConstraint:0x6000035e9e00 UITextField:0x7fd7a4814c00.trailing == UIView:0x7fd7a3e2bc50.trailing (active)>" )

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x6000035e9c70 UIButton:0x7fd7a3e11e60.width == 32 (active)>

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