Keyboard autolayout constraint violations on iPad with iOS 11 and 12
Originator: | ahruman | ||
Number: | rdar://45729580 | Date Originated: | 2018-11-01 |
Status: | Open | Resolved: | |
Product: | iOS SDK; Area: Keyboard | Product Version: | |
Classification: | Other Bug | Reproducible: | Always |
Summary: Since iOS 11, switching between text fields on an iPad causes an autolayout constraint violation in the keyboard view hierarchy. Steps to Reproduce: * Run the attached project on an iPad simulator * Select the text field by User Name * Select the test field by Password Expected Results: No logging or breakpoints hit Actual Results: The project’s shared breakpoint in UIViewAlertForUnsatisfiableConstraints is hit, and a message is logged about unsatisfiable constraints. (Example message included in attachment) Version/Build: Verified on simulators for iOS 11.0.1, 11.4, and 12.1. Cannot reproduce in iOS 10.3.1. Cannot reproduce on iPhone. Configuration:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Example output
[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) ( "",
"<NSLayoutConstraint:0x6000015820d0 V:|-(0)-_UIButtonBarStackView:0x7fa3ee8035e0>",
"",
"",
"",
"<NSLayoutConstraint:0x6000015a5770 'UIView-topMargin-guide-constraint' V:|-(10)-UILayoutGuide:0x600000fa0c40'UIViewLayoutMarginsGuide'>"
)
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.