iOS -Objective C- Prevent the keyboard automatically hide when I set enable = NO on UITextField - ios

I'm working on an App with Objective-C but I have a problem with my form.
I have several inputs view (UITextField) on it, and one with a particularly behavior.
When I select the checkbox, I prevent the user typing on the view and looks the view as disable( grayed out and without the blue bar flashing blue bar ) and keep the keyboard open.
When I set the UITextField as disable, the keyboard is automatically hidden.
Someone knows how to keep the keyboard open?
I need to something like the image attached, but without the blue bar flashing blue bar.
I did the logic to prevent the the user enter data on the input , but the keyboard is automatically hidden.

If the text field is disabled, the user cannot type into it and the dismissal of the keyboard is correct. You should not try to fight against that. (It sounds like you're trying to disable the keyboard for the wrong reasons anyway.)
In this case, it sounds like your timing is just off. When the user clicks the checkbox, your code responds. What you are doing there is just wrong. You should respond by moving the first responder to the next enabled text field yourself, and then disabling the first text field. That way, you are not disabling the text field while it is first responder; that's your whole mistake right there.

Related

How to disable isEnable and isUserInteraction attributes but keep cursor show in UITextField?

I have a custom framework for UITextField. For now, I want to disable two attribute as the question above but still keep the cursor show in my custom textfield. I already disable the keyboard with set the inputView = UIView(), and that successful for hide the keyboard even show the cursor inside textField.
My goal is disable both attributes like above or another for can not Select All action from my textField, but still keep the cursor available anytime.
Hope to hear the ideas from you guys. Thank a lot!

How to show keyboard programmatically in Firefox OS?

I am working on a ToDo list app wherein I keep the focus on the textbox input after the user adds a ToDo item.
Now, the problem is, when the user adds some text input and hits the add button, the focus on the textbox is lost so the keyboard disappears and then the focus gets back to the textbox. So, the keyboard disappears and appears again in a short interval. As you can imagine, this is bad UX.
How do I set the keyboard to be shown explicitly when the focus is on the input button?
I fixed it by setting the focus onto the textbox first when I click the add button then do the actual adding stuff.

Voiceover not focusing on next form field

I have a long HTML form that I am trying to make accessible to Voiceover. When I click into a field, interact with it, and then click Done on the keyboard, after a short delay Voiceover is focusing on what appears to be the field most centered on the screen rather than the next element. I tried adding explicit tabindex to all the fields and this did not help. It is not always reproducable, it sometimes works as expected.
Is this expected behavior for Voiceover? Would a user not expect "Done" to take them to the next field (seems like maybe a dumb question since there is also a "Next" button, which works fine)? But as a sighted user I know the "Done" button when I am interacting with a field just means I am done with that field and want to go on to the next action, field whatever.
"Done" dismisses editing mode on VoiceOver. A VoiceOver user would not expect that tapping "done" moves the VO cursor.

UIButton close to keyboard does not receive touch event

You can test by yourself by cloning this repo https://github.com/sey/ios-keyboard-test.
The problem is the following:
When you enter text in a UITextField and you want to quickly tap a button which position is close to the keyboard the button does not receive touch event at first. You need to wait a small amount of time before tapping on the button does anything.
In the linked project the button action is set to clear the text field. If you enter text and touch the button quickly you will see that the text field does not get cleared and you'll have to touch the button again. If you tap on the button that is on top of the text field (not close to the keyboard) everything work as expected.
I suspect this is a bug from Apple. And I suspect this comes from the fact that some keys on the keyboard show other keys when you long press them (such as E, U). And maybe a hidden frame prevents from touching the button immediately after entering text.
My questions are:
Can you reproduce the bug? And do you know if this has already been
reported with a workaround or else?
[EDIT] Please test in landscape mode.

How do I set a UITextField as the default input field at app launch

I am writing an iPhone app with a keypad and two TextFields on a single view. The user types into each of the text fields. Because I want to use an on-screen keypad, I disabled the the keyboard from launching when each TextField is selected. (I used the method suggested in this thread:
Disable UITextField keyboard?
So far so good EXCEPT the cursor doesn't blink in the either of the two TextFields until they are selected. If I just begin typing without selecting, the first textfield is filled. That's OK, but I would like to set the cursor flashing in that field so the user is notified that that is where the input will go unless they select the other field.
I did not create the text fields programatically. I created them with Interface builder.
How do I programatically select the desired starting text field (ideally some highlight would show up when selected). Right now I just got lucky and the field I want to be the default is the default.
How do I place the flashing cursor onto the right side of that text field.
...Dale
Call [myTextField becomeFirstResponder]; this will notify the receiver that it is about to become first responder in its window. That should set the Cursor in the UITextField.
To programmatically activate a field and make it your starting text field you should use UIResponder's becomeFirstResponder method, which all UITextFields inherit from.
[textField becomeFirstResponder];

Resources