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
Related
On iPhone, is there a way to make the keyboard show numbers above the letters, like computer keyboards? It seems that the keyboard type doesn't provide that.
I know that this will need more space for the keyboard. I can afford that.
By default, no, this is not possible. However, Apple provides a way for developers to attach views to the keyboard. Take a look at inputAccessoryView and inputAccessoryViewController, both UIResponder properties, these are the properties that are used to do this.
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
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
Is there a way to force up a software keyboard when the user has a iOS bluetooth keyboard device installed?
Or, to that end, is it possible in code to disable a specific bluetooth device?
Thanks!
In most (maybe all?) iOS apps with which I have used Apple's bluetooth keyboard, pressing the eject key (located in the top right corner) will bring up the soft keyboard on the screen. Maybe that little factoid could help you in some way.
Not from within the application's code, if you're planning on getting into the app store. Apple expressly does not provide methods to show or hide keyboard, instead pushing you to use becomeFirstResponder and resignFirstResponder.
You may be able to do this through some non-AppStore-friendly methods, but somehow I don't think that's the answer you're looking for.
(Note - you could make a fake, Apple-looking keyboard when the real one is hidden, and check if the real one is hidden based on whether a view is visible, but if Apple notices you doing this, you'll get denied.)
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.