How to detect when keyboard height is updated? - ios

Is there some way to detect when the user changes assistant menu or how it is called?
I'm successfully updating the view position when keyboard show/hide or change the keyboard type emoji and etc. But I'm unable to find how to get notification when users hides or extends word suggestion area.
Image showing the action that I'm trying to catch http://i.stack.imgur.com/hY3di.png

What about UIKeyboardWillChangeFrameNotification?

Related

XCUITest - Tap on Navigation title when it is a button

Hi we change the title of the nav bar to a button so we can show the user a new set of information when tapped. This however makes life difficult for UI testing with XCUITest. We change the title to a button programmatically and I have set the accessbilitylabel and still can't access the button.
I have changed the accessibility label.
Search by text (even though it is dynamic pending user selection)
Used the UI Accessibility inspector- the one with the iOS 9 < sims and the new one with Xcode 8.
Search by otherElements
I did the record and tapped the button but it gave me nonsense and when i used nonsense it hits another spot of the view
Any help would be appreciated.

How to hide keyboard without closing the dialog box using Appium for IOS?

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");

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

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.

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.

UITextView at the bottom of the view

As a new MonoToucher, I have a question which I'm struggling for a while now:
In some cases in my app I need to display a UITextView with a button to its right, at the bottom of the screen.
Basically, I would like to manage some kind of discussion feed in which when the user navigate to a specific discussion he gets the related posts as a list and have a multi-line text input at the bottom of the list with a 'Post' button to the right.
Touching that textView should show the keyboard for input, and the height of the textView should be related to the data entered.
This is the same behavior as we have when we want to write a new Text Message in iPhone, or a post in Facebook.
Another requirement is, that when the user scrolls the posts list, that input (with the button) should not move.
I tried creating a UIToolBar with UITextView and a UIButton, but I can't make it work as expected.
Check out the BubbleCell sample, it does exactly what you want in C#:
https://github.com/xamarin/monotouch-samples/tree/master/BubbleCell

Resources