codenameone / CodenameOne

Cross-platform framework for building truly native mobile apps with Java or Kotlin. Write Once Run Anywhere support for iOS, Android, Desktop & Web.

Home Page:https://www.codenameone.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

On iOs (version 16.2) text field edit dialog, when the keyboard on the iPhone is triggered for typing occur some issues

JTBrandao opened this issue · comments

Text field edit dialog, when the keyboard on the iPhone is triggered for typing has the following flaws:
[1] – The editing area is positioned at the top of the interface where we have the interference of the front camera area, making it difficult to read and / or type the 1st line.
See illustrative images bellow:
image

[2] – As we edit and fill in the editing area: when we reach the bottom of the editing area, does not occur the expected vertical scroll, it is not possible to vertically scroll the text and as we continue to edit the new inserted words is below the visible area (covered by the keyboard area).
See illustrative images bellow:
image

We generated an APP project using cn1 and ran the same on XCODE on a MacBook Pro:
In XCODE the following message was displayed:


2023-01-07 09:13:46.607428-0300 IwCareAppPro[92509:4612587] [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:0x60000837a530 h=--& v=--& _UIToolbarContentView:0x7f8df8f69910.width == 0 (active)>",
"<NSLayoutConstraint:0x600008375540 H:|-(0)-[_UIButtonBarStackView:0x7f8df8f73e80] (active, names: '|':_UIToolbarContentView:0x7f8df8f69910 )>",
"<NSLayoutConstraint:0x600008375590 H:[_UIButtonBarStackView:0x7f8df8f73e80]-(0)-| (active, names: '|':_UIToolbarContentView:0x7f8df8f69910 )>",
"<NSLayoutConstraint:0x60000832b070 'TB_Leading_Leading' H:|-(20)-[_UIModernBarButton:0x7f8dfa1da3a0'Done'] (active, names: '|':_UIButtonBarButton:0x7f8dfa1da170 )>",
"<NSLayoutConstraint:0x60000832b0c0 'TB_Trailing_Trailing' H:[_UIModernBarButton:0x7f8dfa1da3a0'Done']-(20)-| (active, names: '|':_UIButtonBarButton:0x7f8dfa1da170 )>",
"<NSLayoutConstraint:0x60000837a080 'UISV-canvas-connection' UILayoutGuide:0x60000195c700'UIViewLayoutMarginsGuide'.leading == UIView:0x7f8dfa1d9fc0.leading (active)>",
"<NSLayoutConstraint:0x60000837a0d0 'UISV-canvas-connection' UILayoutGuide:0x60000195c700'UIViewLayoutMarginsGuide'.trailing == _UIButtonBarButton:0x7f8dfa1da170.trailing (active)>",
"<NSLayoutConstraint:0x600008379ae0 'UISV-spacing' H:[UIView:0x7f8dfa1d9fc0]-(0)-[_UIButtonBarButton:0x7f8dfa1da170] (active)>",
"<NSLayoutConstraint:0x600008375450 'UIView-leftMargin-guide-constraint' H:|-(0)-UILayoutGuide:0x60000195c700'UIViewLayoutMarginsGuide' (active, names: '|':_UIButtonBarStackView:0x7f8df8f73e80 )>",
"<NSLayoutConstraint:0x6000083754f0 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x60000195c700'UIViewLayoutMarginsGuide']-(0)-|(LTR) (active, names: '|':_UIButtonBarStackView:0x7f8df8f73e80 )>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x60000832b0c0 'TB_Trailing_Trailing' H:[_UIModernBarButton:0x7f8dfa1da3a0'Done']-(20)-| (active, names: '|':_UIButtonBarButton:0x7f8dfa1da170 )>

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.
2023-01-07 09:14:11.184859-0300 IwCareAppPro[92509:4612587] [com.apple.VisionKit.processing] Analysis not completed because device does not support Image Analysis. This will only be logged once.
2023-01-07 09:14:11.207965-0300 IwCareAppPro[92509:4612587] [com.apple.VisionKit.RemoveBackground] Request to remove background on an unsupported device. Error Domain=com.apple.VisionKit.RemoveBackground Code=-8 "(null)"
2023-01-07 09:14:11.208509-0300 IwCareAppPro[92509:4612587] [UILog] Called -[UIContextMenuInteraction updateVisibleMenuWithBlock:]
while no context menu is visible. This won't do anything.
2023-01-07 09:14:11.628923-0300 IwCareAppPro[92509:4612985] LaunchRichTextEditor : iwvar_quadroclinico


We configure the simbolic breakpoint as suggested by XCODE, below the image of what is was displayed:

image

The positioning may be affected by settings like padding/margin etc... in the form. You may want to experiment with form bottom padding,