采用iOS离线打包方案
SDK包:IOS-SDK@1.9.9.42697_20180309.zip
前端使用laya引擎开发,H5+打包发布iOS
打包环境:MacBook Pro (10.13.1)
表现:
点击输入框后,能正常拉起软键盘,且正常显示(页面上移,软键盘不会遮挡输入框)
点击空白区域关闭软键盘后,页面呈现无法响应用户输入的状态(页面本身显示正常,但无法触发页面元素如按钮,输入框等点击事件)
非必现,但触发概率极高(估算70%)
补充:
点击软键盘的确定或者回车则一直正常。
点击输入框后,xcode上会输出以下日志
> 2018-05-08 16:42:13.936265+0800 demo[23162:5397404] API error: <_UIKBCompatInputView: 0x1026df100; frame = (0 0; 0 0); layer = <CALayer: 0x10aec1310>> returned 0 width, assuming UIViewNoIntrinsicMetric
2018-05-08 16:42:13.936503+0800 demo[23162:5397404] API error: <_UIKBCompatInputView: 0x1026df100; frame = (0 0; 0 0); layer = <CALayer: 0x10aec1310>> returned 0 width, assuming UIViewNoIntrinsicMetric
2018-05-08 16:42:14.176180+0800 demo[23162:5397404] [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:0x10b2d8650 h=-&- v=-&- _UIToolbarContentView:0x10b60fdb0.width == UIToolbar:0x10a411560.width (active)>",
"<NSLayoutConstraint:0x10ba373c0 H:|-(0)-[_UIButtonBarStackView:0x10a83a410] (active, names: '|':_UIToolbarContentView:0x10b60fdb0 )>",
"<NSLayoutConstraint:0x10b74e2d0 _UIButtonBarStackView:0x10a83a410.trailing == _UIToolbarContentView:0x10b60fdb0.trailing + 8 (active)>",
"<NSLayoutConstraint:0x106229eb0 H:|-(0)-[_UIModernBarButton:0x10ba49da0] (active, names: '|':_UIButtonBarButton:0x10b736680 )>",
"<NSLayoutConstraint:0x1027bd7e0 H:[_UIModernBarButton:0x10ba49da0]-(>=8)-| (active, names: '|':_UIButtonBarButton:0x10b736680 )>",
"<NSLayoutConstraint:0x109a10de0 H:|-(>=5)-[_UIModernBarButton:0x10bd6f570] (active, names: '|':_UIButtonBarButton:0x10b7c8b10 )>",
"<NSLayoutConstraint:0x10b6ae030 H:[_UIModernBarButton:0x10bd6f570]-(>=5)-| (active, names: '|':_UIButtonBarButton:0x10b7c8b10 )>",
"<NSLayoutConstraint:0x10bd87f10 H:|-(8)-[_UIModernBarButton:0x10ae00720'\U5b8c\U6210'] (active, names: '|':_UIButtonBarButton:0x102663280 )>",
"<NSLayoutConstraint:0x10b5a5c80 H:[_UIModernBarButton:0x10ae00720'\U5b8c\U6210']-(0)-| (active, names: '|':_UIButtonBarButton:0x102663280 )>",
"<NSLayoutConstraint:0x10b65eea0 'UISV-canvas-connection' UILayoutGuide:0x10b7802a0'UIViewLayoutMarginsGuide'.leading == _UIButtonBarButton:0x10b736680.leading (active)>",
"<NSLayoutConstraint:0x10aea7810 'UISV-canvas-connection' UILayoutGuide:0x10b7802a0'UIViewLayoutMarginsGuide'.trailing == _UIButtonBarButton:0x102663280.trailing (active)>",
"<NSLayoutConstraint:0x10c35d840 'UISV-spacing' H:[_UIButtonBarButton:0x10b736680]-(0)-[UIView:0x10a4ee1e0] (active)>",
"<NSLayoutConstraint:0x10a83eaa0 'UISV-spacing' H:[UIView:0x10a4ee1e0]-(0)-[_UIButtonBarButton:0x10b7c8b10] (active)>",
"<NSLayoutConstraint:0x10a83eaf0 'UISV-spacing' H:[_UIButtonBarButton:0x10b7c8b10]-(0)-[UIView:0x10bb782a0] (active)>",
"<NSLayoutConstraint:0x10bb0e970 'UISV-spacing' H:[UIView:0x10bb782a0]-(0)-[_UIButtonBarButton:0x102663280] (active)>",
"<NSLayoutConstraint:0x109aa8380 'UIView-Encapsulated-Layout-Width' UIToolbar:0x10a411560.width == 0 (active)>",
"<NSLayoutConstraint:0x10b6ae4b0 'UIView-leftMargin-guide-constraint' H:|-(0)-UILayoutGuide:0x10b7802a0'UIViewLayoutMarginsGuide' (active, names: '|':_UIButtonBarStackView:0x10a83a410 )>",
"<NSLayoutConstraint:0x10b6831f0 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x10b7802a0'UIViewLayoutMarginsGuide']-(0)-|(LTR) (active, names: '|':_UIButtonBarStackView:0x10a83a410 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x1027bd7e0 H:[_UIModernBarButton:0x10ba49da0]-(>=8)-| (active, names: '|':_UIButtonBarButton:0x10b736680 )>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2 个回复
1***@qq.com
现在有解决吗???
1***@qq.com - 前端开发er
同上,题主解决了么?