Detect Smiley and Globe when selected in iOS 8 keyboard - ios

I need to be able to detect when the user selects the smiley and globe on the iPhone and iPad keyboard so I can resize my view based on if predictive text is supported.
I have tried myUITextView and keyboard delegates but no luck there. Thank you for your help

You want to listen for the UIKeyboardWillChangeFrameNotification notification.
The userInfo dictionary contains information about the keyboards frame, animation duration and curve.
With this info, you can then uplate your UI to move any views out the way if needed etc.
More Info: https://developer.apple.com/library/ios/documentation/uikit/reference/UIWindow_Class/UIWindowClassReference/UIWindowClassReference.html

If the use selected globe or emoji, your keyboard will be dismissed. Why you need to know?
edit: sorry I though you are building third-party keyboard

Related

Change uitextfield using the dismiss keyboard icon on the iPad

On the iPad there is an icon to dismiss the keyboard on the bottom right of the screen. When a user changes their input data, and taps on this icon, the prior results (calculations) are still displayed. I need to change the UITextField results so that they know they must tap on my submit button to update the results. Any thoughts?
If your code is looking for the UIKeyboardWillHideNotification, you'll know when you can update your calculations.
Sample code can be seen here.
p.s. welcome to StackOverflow! For future questions, it might be useful to tag then with the language that you're using (objective-c or swift), as well as ios.

How do I support VoiceOver in UIPickerView on an iPad running an iPhone only app (non-universal)?

Generally I look at Apple's UICatalog sample code for basic VoiceOver support however it looks like there is VoiceOver support for UIPickerViews in the sample code. Do I need to provide an accessibilityLabel method somewhere to add VoiceOver support? I tried to implement UIPickerViewAccessibilityDelegate methods but voice over only reads the labels in my picker view and not the hint to swipe up or down to change the values.
Also my picker view is set to the input view of a UITextField. So I'm not sure if that is relevant or not.
Update:
https://github.com/stevemoser/VoiceOverPicker
I created a sample project demonstrating the issue. In the example there is a normal picker view shown and a textfield. There is also a picker that is set to the textfield's input view property. I can't seem to activate the either picker just by tapping on it while using VoiceOver. Though I can activate either one by swiping (left and right) through the views on screen. Any ideas?
Update 2:
Looks like if the app is an iPhone app running on an iPhone or an iPad app running on an iPad it works fine but if it is an iPhone only app running on an iPad, tapping to select a UIPickerView doesn't work.
Are you just doing a vanilla UIPickerView using titles for each row (and not custom views)? If so, there isn't anything that you should have to do.
You mentioned that VoiceOver was correctly reading the label on each row, so we know that the UIPickerView correctly has isAccessibilityElement set to YES. It's also correctly reading the accessibilityLabels.
Is it possible that you're interacting with the picker before it has a chance to read the accessibilityHint? (For the benefit of others, the accessibilityHint is the "swipe or down with one finger to adjust the value" that Steve mentioned in his question.) Or perhaps some notification is changing the VoiceOver focus before the hint has a chance to be read?
By default, if your picker view is accessible, when you focus on it with VoiceOver it will read the something along these lines:
"[ROW LABEL] Adjustable [#number] out of [#total] picker item" a 2 to
3 second pause then "Swipe up or down to select value"
A few of things to note:
There is a 2 to 3 second delay between reading the label and the hint, make sure you wait for it.
If you're providing your own hint, the default one will not get read I believe
Hints are only read when you reach a certain control by either directly pressing it or by swiping right or left to the control. it will not get read if you do a 2 finger swipe down or up.
Make sure you're testing on an actual device and not a simulator as it does not show all of the things VoiceOver announces.

Detect tap and hold on iOS Keyboard Keys

I'd like a custom method to be fired when I tap an hold a given key on the keyboard of the iPhone. It would also need to override the alternate character pop up.
Where should I start with this? I haven't tried anything too hackey in iOS yet
it's not possible in non-jailbroken iOS. Also, it may not be a good idea, as this only makes sense on QWERTY keyboard. For example Japanese iPhone keyboard would be impossible to use without tap to hold and Chinese keyboard has drawing area instead of keys. – porneL Jul 20 at 12:53

Disabling Split Option in iOS5 Keyboard

I am facing problem in my app because of the new split keyboard option in iOS5.
Is there any way we can hide or disable this option in objective C?.
Thanks in advance.
Seems like the split keyboard does not use the same functions as regular keyboard. see here.
missing kb notifications
Here's the problem: You can iterate through the keyboard subviews and hide the button but you can't control the state of the keyboard when going from one app to the next. It would get really tricky and sneaky to force the private api to call when the application did enter foreground and the keyboard became active.
You could do this but apple may deny you from the store.
Fix your view to account for the keyboard movement. Your users will dock or unsplit the keyboard when there's clear disruption in the UI due to the keyboard placement.
Other solutions could be to move the entire view that requires keyboard placement to be docked or undocked using the notifications. See other posting here: StackOverflow article

Show iPhone keyboard programmatically

I want show the iphone keyboard. How can I write the code (programmatically) to show the keyboard.
As Jacob said, you'll have to run becomeFirstResponder on a UITextView to make it the first responder, the object the user's currently working with. If you do this, the iPhone OS automatically shows the keyboard, cause that's what's needed for working with a UITextView from a user perspective.
As others have noted, you send the becomeFirstResponder message to the control that you want the keyboard to edit.
One extra thing you should be aware of is that if you plug an external keyboard into an iPad then the keyboard will not appear on screen. You need to design your view so it doesn't look silly without the on-screen keyboard.

Resources