Я создал приложение с вкладками в Xcode (Swift 5). Вкладки приложения (их 4) работают нормально. Две в настоящее время загружают черные страницы, а две другие загружают веб-представление (WKWebView). Веб-представление прекрасно работает, но при использовании текстового поля на основе веб-интерфейса клавиатура практически не отображается.
Я попытался удалить и настроить ограничения, но это не удалось, поскольку проблема все еще существует.
Вот вывод ошибки:
2019-06-11 20:17:51.999824+0100 TabbedApp[37023:4521411] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/james/Library/Developer/CoreSimulator/Devices/D1D0ACFE-2F91-40E6-B1EF-BF8FAB1DAC57/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2019-06-11 20:17:52.000649+0100 TabbedApp[37023:4521411] [MC] Reading from private effective user settings.
2019-06-11 20:17:52.167789+0100 TabbedApp[37023:4521411] [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:0x600003c738e0 h=-&- v=-&- _UIToolbarContentView:0x7fcc6fe1e220.width == UIToolbar:0x7fcc6fe1dbb0.width (active)>",
"<NSLayoutConstraint:0x600003c6bd40 H:|-(0)-[_UIButtonBarStackView:0x7fcc6fe207f0] (active, names: '|':_UIToolbarContentView:0x7fcc6fe1e220 )>",
"<NSLayoutConstraint:0x600003c6bd90 _UIButtonBarStackView:0x7fcc6fe207f0.trailing == _UIToolbarContentView:0x7fcc6fe1e220.trailing (active)>",
"<NSLayoutConstraint:0x600003c67200 H:|-(0)-[_UIModernBarButton:0x7fcc6fe32f60] (active, names: '|':_UIButtonBarButton:0x7fcc6fe327d0 )>",
"<NSLayoutConstraint:0x600003c67250 H:[_UIModernBarButton:0x7fcc6fe32f60]-(>=8)-| (active, names: '|':_UIButtonBarButton:0x7fcc6fe327d0 )>",
"<NSLayoutConstraint:0x600003c678e0 H:|-(>=5)-[_UIModernBarButton:0x7fcc6fe35590] (active, names: '|':_UIButtonBarButton:0x7fcc6fe34f20 )>",
"<NSLayoutConstraint:0x600003c67930 H:[_UIModernBarButton:0x7fcc6fe35590]-(>=5)-| (active, names: '|':_UIButtonBarButton:0x7fcc6fe34f20 )>",
"<NSLayoutConstraint:0x600003c6f200 H:|-(8)-[_UIModernBarButton:0x7fcc6fe363f0'Done'] (active, names: '|':_UIButtonBarButton:0x7fcc6fe228b0 )>",
"<NSLayoutConstraint:0x600003c6f250 H:[_UIModernBarButton:0x7fcc6fe363f0'Done']-(0)-| (active, names: '|':_UIButtonBarButton:0x7fcc6fe228b0 )>",
"<NSLayoutConstraint:0x600003c6f610 'UISV-canvas-connection' UILayoutGuide:0x6000026347e0'UIViewLayoutMarginsGuide'.leading == _UIButtonBarButton:0x7fcc6fe327d0.leading (active)>",
"<NSLayoutConstraint:0x600003c6f930 'UISV-canvas-connection' UILayoutGuide:0x6000026347e0'UIViewLayoutMarginsGuide'.trailing == _UIButtonBarButton:0x7fcc6fe228b0.trailing (active)>",
"<NSLayoutConstraint:0x600003c6f980 'UISV-spacing' H:[_UIButtonBarButton:0x7fcc6fe327d0]-(0)-[UIView:0x7fcc6fe34d40] (active)>",
"<NSLayoutConstraint:0x600003c6f9d0 'UISV-spacing' H:[UIView:0x7fcc6fe34d40]-(0)-[_UIButtonBarButton:0x7fcc6fe34f20] (active)>",
"<NSLayoutConstraint:0x600003c6fa20 'UISV-spacing' H:[_UIButtonBarButton:0x7fcc6fe34f20]-(0)-[UIView:0x7fcc6fe358d0] (active)>",
"<NSLayoutConstraint:0x600003c6fa70 'UISV-spacing' H:[UIView:0x7fcc6fe358d0]-(0)-[_UIButtonBarButton:0x7fcc6fe228b0] (active)>",
"<NSLayoutConstraint:0x600003c77b10 'UIView-Encapsulated-Layout-Width' UIToolbar:0x7fcc6fe1dbb0.width == 0 (active)>",
"<NSLayoutConstraint:0x600003c6bac0 'UIView-leftMargin-guide-constraint' H:|-(0)-[UILayoutGuide:0x6000026347e0'UIViewLayoutMarginsGuide'](LTR) (active, names: '|':_UIButtonBarStackView:0x7fcc6fe207f0 )>",
"<NSLayoutConstraint:0x600003c6bb60 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x6000026347e0'UIViewLayoutMarginsGuide']-(0)-|(LTR) (active, names: '|':_UIButtonBarStackView:0x7fcc6fe207f0 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600003c67250 H:[_UIModernBarButton:0x7fcc6fe32f60]-(>=8)-| (active, names: '|':_UIButtonBarButton:0x7fcc6fe327d0 )>
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.
2019-06-11 20:17:52.169351+0100 TabbedApp[37023:4521411] [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:0x600003c738e0 h=-&- v=-&- _UIToolbarContentView:0x7fcc6fe1e220.width == UIToolbar:0x7fcc6fe1dbb0.width (active)>",
"<NSLayoutConstraint:0x600003c6bd40 H:|-(0)-[_UIButtonBarStackView:0x7fcc6fe207f0] (active, names: '|':_UIToolbarContentView:0x7fcc6fe1e220 )>",
"<NSLayoutConstraint:0x600003c6bd90 _UIButtonBarStackView:0x7fcc6fe207f0.trailing == _UIToolbarContentView:0x7fcc6fe1e220.trailing (active)>",
"<NSLayoutConstraint:0x600003c678e0 H:|-(>=5)-[_UIModernBarButton:0x7fcc6fe35590] (active, names: '|':_UIButtonBarButton:0x7fcc6fe34f20 )>",
"<NSLayoutConstraint:0x600003c67930 H:[_UIModernBarButton:0x7fcc6fe35590]-(>=5)-| (active, names: '|':_UIButtonBarButton:0x7fcc6fe34f20 )>",
"<NSLayoutConstraint:0x600003c6f200 H:|-(8)-[_UIModernBarButton:0x7fcc6fe363f0'Done'] (active, names: '|':_UIButtonBarButton:0x7fcc6fe228b0 )>",
"<NSLayoutConstraint:0x600003c6f250 H:[_UIModernBarButton:0x7fcc6fe363f0'Done']-(0)-| (active, names: '|':_UIButtonBarButton:0x7fcc6fe228b0 )>",
"<NSLayoutConstraint:0x600003c6f610 'UISV-canvas-connection' UILayoutGuide:0x6000026347e0'UIViewLayoutMarginsGuide'.leading == _UIButtonBarButton:0x7fcc6fe327d0.leading (active)>",
"<NSLayoutConstraint:0x600003c6f930 'UISV-canvas-connection' UILayoutGuide:0x6000026347e0'UIViewLayoutMarginsGuide'.trailing == _UIButtonBarButton:0x7fcc6fe228b0.trailing (active)>",
"<NSLayoutConstraint:0x600003c6f980 'UISV-spacing' H:[_UIButtonBarButton:0x7fcc6fe327d0]-(0)-[UIView:0x7fcc6fe34d40] (active)>",
"<NSLayoutConstraint:0x600003c6f9d0 'UISV-spacing' H:[UIView:0x7fcc6fe34d40]-(0)-[_UIButtonBarButton:0x7fcc6fe34f20] (active)>",
"<NSLayoutConstraint:0x600003c6fa20 'UISV-spacing' H:[_UIButtonBarButton:0x7fcc6fe34f20]-(0)-[UIView:0x7fcc6fe358d0] (active)>",
"<NSLayoutConstraint:0x600003c6fa70 'UISV-spacing' H:[UIView:0x7fcc6fe358d0]-(0)-[_UIButtonBarButton:0x7fcc6fe228b0] (active)>",
"<NSLayoutConstraint:0x600003c77b10 'UIView-Encapsulated-Layout-Width' UIToolbar:0x7fcc6fe1dbb0.width == 0 (active)>",
"<NSLayoutConstraint:0x600003c6bac0 'UIView-leftMargin-guide-constraint' H:|-(0)-[UILayoutGuide:0x6000026347e0'UIViewLayoutMarginsGuide'](LTR) (active, names: '|':_UIButtonBarStackView:0x7fcc6fe207f0 )>",
"<NSLayoutConstraint:0x600003c6bb60 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x6000026347e0'UIViewLayoutMarginsGuide']-(0)-|(LTR) (active, names: '|':_UIButtonBarStackView:0x7fcc6fe207f0 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600003c67930 H:[_UIModernBarButton:0x7fcc6fe35590]-(>=5)-| (active, names: '|':_UIButtonBarButton:0x7fcc6fe34f20 )>
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.
2019-06-11 20:17:52.170629+0100 TabbedApp[37023:4521411] [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:0x600003c738e0 h=-&- v=-&- _UIToolbarContentView:0x7fcc6fe1e220.width == UIToolbar:0x7fcc6fe1dbb0.width (active)>",
"<NSLayoutConstraint:0x600003c6bd40 H:|-(0)-[_UIButtonBarStackView:0x7fcc6fe207f0] (active, names: '|':_UIToolbarContentView:0x7fcc6fe1e220 )>",
"<NSLayoutConstraint:0x600003c6bd90 _UIButtonBarStackView:0x7fcc6fe207f0.trailing == _UIToolbarContentView:0x7fcc6fe1e220.trailing (active)>",
"<NSLayoutConstraint:0x600003c6f200 H:|-(8)-[_UIModernBarButton:0x7fcc6fe363f0'Done'] (active, names: '|':_UIButtonBarButton:0x7fcc6fe228b0 )>",
"<NSLayoutConstraint:0x600003c6f250 H:[_UIModernBarButton:0x7fcc6fe363f0'Done']-(0)-| (active, names: '|':_UIButtonBarButton:0x7fcc6fe228b0 )>",
"<NSLayoutConstraint:0x600003c6f610 'UISV-canvas-connection' UILayoutGuide:0x6000026347e0'UIViewLayoutMarginsGuide'.leading == _UIButtonBarButton:0x7fcc6fe327d0.leading (active)>",
"<NSLayoutConstraint:0x600003c6f930 'UISV-canvas-connection' UILayoutGuide:0x6000026347e0'UIViewLayoutMarginsGuide'.trailing == _UIButtonBarButton:0x7fcc6fe228b0.trailing (active)>",
"<NSLayoutConstraint:0x600003c6f980 'UISV-spacing' H:[_UIButtonBarButton:0x7fcc6fe327d0]-(0)-[UIView:0x7fcc6fe34d40] (active)>",
"<NSLayoutConstraint:0x600003c6f9d0 'UISV-spacing' H:[UIView:0x7fcc6fe34d40]-(0)-[_UIButtonBarButton:0x7fcc6fe34f20] (active)>",
"<NSLayoutConstraint:0x600003c6fa20 'UISV-spacing' H:[_UIButtonBarButton:0x7fcc6fe34f20]-(0)-[UIView:0x7fcc6fe358d0] (active)>",
"<NSLayoutConstraint:0x600003c6fa70 'UISV-spacing' H:[UIView:0x7fcc6fe358d0]-(0)-[_UIButtonBarButton:0x7fcc6fe228b0] (active)>",
"<NSLayoutConstraint:0x600003c77b10 'UIView-Encapsulated-Layout-Width' UIToolbar:0x7fcc6fe1dbb0.width == 0 (active)>",
"<NSLayoutConstraint:0x600003c6bac0 'UIView-leftMargin-guide-constraint' H:|-(0)-[UILayoutGuide:0x6000026347e0'UIViewLayoutMarginsGuide'](LTR) (active, names: '|':_UIButtonBarStackView:0x7fcc6fe207f0 )>",
"<NSLayoutConstraint:0x600003c6bb60 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x6000026347e0'UIViewLayoutMarginsGuide']-(0)-|(LTR) (active, names: '|':_UIButtonBarStackView:0x7fcc6fe207f0 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600003c6f250 H:[_UIModernBarButton:0x7fcc6fe363f0'Done']-(0)-| (active, names: '|':_UIButtonBarButton:0x7fcc6fe228b0 )>
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.
Я ожидал, что клавиатура будет хорошо выглядеть, как и в других приложениях, которые я создал с использованием веб-представления, но у меня впервые возникла эта проблема. Я надеюсь, что это что-то простое, что я, возможно, пропустил. Я не уверен, что еще попробовать, поэтому любая помощь будет принята с благодарностью. Я предполагаю, что должен дать приоритет клавиатуры, но я могу быть далеко ...