Can not choose Japanese keyboard in some apps - ios

everybody!
I've been struggling with fixing one issue in one of the apps that we are working on for the whole week now and I didn't get any idea of the reasons and possible solution. Could you please help me out - maybe some of you encountered the same problem:
Initially the issue has been reported in just one project, but then I also tried to reproduce it in other apps - in some of the apps the same problems was present, in some everything worked properly.
So the problem:
open the app
select any text field
try to select Japanese keyboard (keeping in mind that the
language has been already added in the settings of the iPhone)
Actual Result: Japanese keyboard is not being displayed in the list of available keyboards in the app
Expected Result: Japanese keyboard should be available in the list of available keyboards and user should be able to input text in the text field in Japanese
I would really appreciate if somebody could share some additional insights. Or maybe ways you fixed it in case you came across a similar issue.
Thanks!

It may be caused by the text field's keyboard type.
Make sure the keyboard type is default or another, appropriate, non-ASCII-compatible type.
textField.keyboardType = .default
The keyboard type for a text field or view can also be configured in Interface Builder.
See also:
the keyboard type property for UITextInputTraits-conforming classes
all available keyboard types.

Related

resignFirstResponder() in Third-Party Keyboards

I have a third party keyboard that currently contains a UISearchBar(that is first responder on start) and the user is able to search for content (i.e. gifs) to be able to copy, paste, send to friends, etc.
In theory, after entering text in the bar and pressing search, the user should be able to enter text in the application's actual UITextView (i.e. the message field in the messages app) but for some reason this doesn't work and although typing works, nothing actually appears.
I have tried searchBar.resignFirstResponder(), self.becomeFirstResponder() and many combinations of .endEditing(true) to no avail.
I know it is possible to do this as apps like Giffy do it but I can't figure it out for the life of me.
Any help would be greatly appreciated.
Keyboard extensions with built-in search bars usually implement their search bar as a UILabel, adding custom text handling behavior that modifies the text property of the label based on user input.

IOS: Text Selection in WKWebView (WKSelectionGranularityCharacter)

I've got an app that uses a web view where text can be selected. It's long been an annoyance that you can't select text across a block boundary in UIWebView. WKWebView seems to fix this with a property on its configuration: selectionGranularity. One of the possible values is WKSelectionGranularityCharacter:
Selection endpoints can be placed at any character boundary.
Sounds great! Exactly what I need. Except that when I set that in my web view, I often can no longer select text at all. What is going on? Is there something else I need to set? Has anyone figured this out?
Update: I've figured out the following bugs:
When there is more than one WKWebView in an app with selectionGranularity set to WKSelectionGranularityCharacter, only the most recent one to load can select text. I've filed this as bug 18441138.
If there is a click handler attached to an element inside the body in the HTML content of a WKWebView whose selectionGranularity is set to WKSelectionGranularityCharacter, text selection doesn't work inside that element. I've filed this as bug 18440833.
Text selection fails in the WKWebView after you've entered edit mode on a UITextView somewhere else in the app until the WKWebView reloads. I've filed this as bug 18468405.
Has anyone worked around any of these?
These and other issues are all fixed as of iOS 13.
There are several known bugs that are still not fixed.
You can execute JavaScript to get selected text as a workaround.
window.getSelection().toString()
Docs

Xcode 5.1 method search only allows one character?

I've recently upgraded to Xcode 5.1 and I'm experiencing the most annoying bug. The instant search or method search dialog that allows you to search the methods on the given source file you are looking at isn't allowing me to enter more than one character. I have large source files and I tend to rely on that a lot. Any idea why this might be happening. I've tried re-installing Xcode (simply be dragging it in the trash).
You can find the search field I'm talking about by clicking the method as shown in the screenshot and simply typing something.
When I type the character gets replaced with the last letter entered.
(This one's just informational: I don't think it will fit in a comment, and want to report on what suggestions worked and didn't.)
I ran into this same problem. I accidentally typed some other key combo when trying to do Ctrl+6 to open the Document Items dropdown, and it was all out of whack after that.
As clance_911 mentioned, the filtering would work after clicking in the search box. So for example, to filter for "init", I could hit Ctrl+6 to open the Document Items, type "i" to start filtering (but then any subsequent letters would replace the i), click into the search text box, and continue typing the "nit". This works, but it's a pain.
As Moze pointed out, this seems to be specific to external displays. Sure enough, it worked fine on my MacBook display, but if I moved Xcode over to the external display, it stopped working. In my case, dragging the menu bar in the display Arrangements settings (to make the external monitor the main display) did solve the problem: the filter worked correctly with Xcode in either window. Sorry, Etienne :-(
The other solution that worked for me was simply closing the MacBook: use it in clamshell mode with only the external display. This is my normal setup anyway, but I know that's not ideal for everyone.
It happens if Xcode is open in external display that is not main display.
To fix it, open display setting's Arrangement tab and drag menu bar to display that you are working on.

Show keyboard according to font selection ios

I want to create a Alphabet (Character) tracing and learning app.Which will be multilingual app.The font for different language will be attached in app resource folder. First user select language and fond. According to language selection the keyboard will be shown.Then user enter a character and trace. Is it possible to show keyboard according to language selection.Or I have to create custom keyboard.Please suggest me.
You have no control over which keyboard gets shown, unless you create a custom one, unfortunately. If you had control, you might request to show a keyboard that the user has not enabled in their settings and this would cause a problem. The only keyboards you can request to open are the ones listed in UIKeyboardType

J2me Blackberry Numeric Input

I am developing a blackberry application using j2me and LWUIT (blackberry port). Everything works great except for the TextField in numeric mode. Basically when you have focus on the TextField you have to first go into "NUMERIC" mode (by pressing alt + aA) in order to input, which is not user friendly and a problem.
The proposed solution is to use a TextArea instead that allows you to open a NATIVE type input box. The problem there is that the user needs to focus the field and then press the fire button which again is unfriendly.
Does anyone know of any simple solutions?
The few solutions i have in mind (but not sure how to do them):
1) Capture any keypress on the TextArea and go into NATIVE mode, instead of just the fire key.
2) Put the blackberry input mode into numeric using code for the whole form.
Any advice will be appreciated.
Many Thanks,
Paul
I'm not sure whether this solution is one that would appeal to your needs or not, but you could add j2me onKeyPress handling that "translates" the letter keypresses into the numbers that correspond to the same key and adds the "correct" number to the textfield instead of what the user actually pressed. Do keep in mind that such a solution would require you to worry portability issues as far as not all blackberry models using the same keyboard layout (qwerty vs. reduced qwerty for example) and handling the variation in layouts sufficiently.
Okay well to answer my own question.
I overrided the keyRelease method on a TextArea. And in this method if the keypress is not an arrow key i the call editString method (this causes the native textfield to open). The only downside to this is that it will always miss the first keypress in the text box.

Resources