After making usernameTextfield firstresponder, I see below screen for entering username.
I want to disble (or not focused) Next button until textfield has 0 characters. How can I do it?
Also, how can I capture tv remotes Back and Press event on keyboard?
I read other post How to disable/enable the return key in a UITextField? but It didn't helped me.
In apple docs, it's mentioned that
optional public var enablesReturnKeyAutomatically: Bool { get set } // default is NO (when YES, will automatically disable return key when text widget has zero-length contents, and will automatically enable when text widget has non-zero-length contents)
If this is not possible, then is it possible to add tapgesturerecognizer on this screen so that I can know when user click or pressed Menu button on Remote?
As of now my research says its not possible to disable return key ( Next / Done ) in tvOS but its possible to know when user clicked Next or Done button on keyboard by using .primaryActionTriggered event.
Related
Question is, Whether a button can be placed below the software keyboard that comes in the iPhone when we tap to enter some text.
The soft keyboard comes from the very bottom of the screen , can it be made to move little up and a button can be placed ??
No, this is impossible with public APIs. Your only other option would be to use a completely custom input view.
I work on a iPhone project with iOS 4 and Xcode 4.
In a view I have several UITextField, that the user fills with numbers. So only the Numbers keyword is used.
When the user fills in a text field and click Go, some processing is started (modification of the text of several textFields).
Now I would like to consider also a second option: user open the keyboard but then decides to close it without any process (i.e. cancel the process).
So I need a keyboard with a cancel key as shown on this the picture:
Finally my question: how can I create a keyboard with a cancel key as above?
Edit: picture of my view
The keyboard cannot be modified. You should add a cancel button, or some other way of triggering a cancel, in your UI.
Can any one please let me know how to disable the 'Go' button on keyboard?
The purpose is: when the text field is empty Go button has to be disable (gray color) and when type some thing the Go button become active and color blue. (Same as Apple Find iPhone app).
Many thanks
In Interface builder, tick the box which is labelled Auto-enable Return Key.
In code do: [textField setEnablesReturnKeyAutomatically:YES];
The Return key (Go key) will only be enabled when the text field is not empty.
How can I display a button and/or activity indicator inside of a UITextField on the iPhone? I'm trying to reproduce Mobile Safari's location text field which contains either a reload button or a cancel (stop loading) button which is right-justified inside of the text field.
Similarly, when you click inside of the text field (not on the cancel/reload buttons) to edit the URL, a clear icon (x inside of a circle) is shown inside of the text field which will erase the contents of the text field.
How can I create this in my own apps? I cannot seem to do it via Interface Builder so I suspect it's being done in code.
There is a built in option that worked for me...check here:
Adding the "Clear" Button to an iPhone UITextField
Check out TTMessageController.
Current solution:
user clicks on label and it is switched with a textarea to allow edit
user can leave edit with tab / enter and textarea is switched back to a label
The problem is the user has to click on the label with a mouse to get into edit mode.
I would like the label to recieve an onFocus event when the user clicks the TAB key and the label is the next widget in line.
Possible soulution (but have not tried yet) to inherit a new widget from the Label widget and implement the TabListener interface.
There is a panel called the focus panel. That panel allows widgets that normally dont receive events like keyboard events (e.g., a label is one) to have events.
checkout the docs here