I'm trying to implement a feature where if a user taps on a button, it brings up the textfield for the user to type something in. Once the user is done, I want to navigate the user to another screen with text that he just typed.
How do I implement bringing up the textfield for the user to type in when the button is tapped?
on the button action just add self.yourTextField.becomeFirstResponder
...
then controller.text = yourTextField.text
...
Related
I need to add clear button in table view section header. It is exactly same like the one in notification center. So when user clicks it, 'x' will change to 'Clear'. If s/he clicks it again, app will perform action. But any click outside this button, 'Clear' will be back to 'x'.
Reference: http://share.framerjs.com/5hc7e6kwtwfm/
I have a dialog box that appears and while closing keyboard with hideKeyboard(); all the form is closed and i get back to the home page so that i can't continue the scenario for filling other data.
Here the screen :
Just use UIScrollView in your dialog box, and set scroll view class TPKAScrollViewController. Download class
You can fill up the fields first using driver.sendkey() then tap on keyboard next button to switch the driver to the next field untill the last field. in last field you will get done button then you can tap on that button.
The default "strategy" of hideKeyboard(); is to tap outside the keyboard, but this can be changed to pressing a key on the keyboard instead.
See the java-client documentation (assuming you're using java-client?) for available hideKeyboard strategies: http://appium.github.io/java-client/io/appium/java_client/ios/IOSDeviceActionShortcuts.html
If your app's keyboard has for example a "Next" button to close the keyboard with, then you could use: driver.hideKeyboard("Next");
I am making a custom keyboard and i want to change my keyboard layout to adapt to the UITextField type (url, websearch, email) every time user change the focus between textfields.
For example:
Beginning, user inputs in url textfield, my keyboard will show a dot button.
After finished the editing in url textfield, user focus on email textfield, my keyboard will replace a dot button by # button.
The question is how to catch this even in custom keyboard?
I have a simple application which has a Table View (TV1) which gets populated by the user selecting a navigation bar button item to Add Entry (VC1). Within the Add Entry, when the user presses the Name field, they're taken to another Table View (TV2) which serves the purpose of allowing the user to select a previously entered name or create a new name.
TV2 is a Table View Controller with a Search Bar at the top.
Right now, existing names are available and show to the user. However, if the user "searches" for a name that does not exist, they should have the option to Create that name right now. If a search does not exist, I have a button which the user can tap which will create the user. That's simple. However, it's another tap.
Is there a way I can get the Search button of the Keyboard to perform the same functionality of the create button (i.e. Save the new user and dismiss TV1) which would then allow me to remove the Create button in the middle of the table view?
try this:
searchBar.delegate = delegateInstance;
//delegateInstance.m
- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar{
//perform the same functionality of the create button
}
You can catch the event fired by tapping the search button this way :
UISearchDisplayController has a UISearchBar, you can set a delegate
for search bar and implement -searchBarSearchButtonClicked:.
From now, you should be able to call the same treatment that you do on create button. Found this answer on this post. Hope that helps !
I don't think you can find a right keyboard ReturnKeyType for "Create" or "Add" to let user know the return key of the keyboard will create a user. =)
Anyway, I guess what you want is if you click "search" button second time with no search result displayed on the tableview then you want to create a user with new search text on the search bar. Did I understand right? If so, I think I already answered your question.
In UISearchBarDelegate, – searchBarSearchButtonClicked:, Check if you don't have any search results and have any text in the search bar, then you can create a user.
I have a UITextField in my app. When the user selects it, a keyboard is presented with a done button. The keyboard is dismissed by pressing the done button. But the done button is only enabled after the user has entered text. I want the user to have the option of dismissing the keyboard without entering text. Is it possible to enable the done button before text has been entered?
OK, I discovered this is resolved by unchecking the Auto-enable Return Key property in the Attributes Inspector.