In an iOS application, is it possible to make own keyboard suggestions if the user taps a specific UITextField? The suggestion should only appear if the UITextField is empty.
By keyboard recommendations I mean the Predictive Keyboard:
Swift code is preferred.
Thanks!
I don't think you can provide suggestions to the actual keyboard so they get presented, but what you can do is write your own inputAccessoryView to be there instead, and handle the tapping/appending of text yourself, and possibly disable the completion from the keyboard. This is essentially what the messaging apps do to present a bar with buttons to add photos and attachments when writing.
Since you don't mention what you're trying to accomplish I don't know if this would make sense. Let me know if you want me to elaborate on how to do this in code.
Related
I'm making ios keyboard extension and it contains view which has a TextField, but I realized this view is keyboard itself...
To input text in this TextField, what is the best solution?
That's all I can come up with at the moment(I don't know it's possible or not)
Call native keyboard and get a callback on complete input. (It looks impossible)
Use some awesome keyboard library that can be imported to view. (It looks the best solution, or do I need make keyboard scratch...?)
Move container app and back on complete to input. (It's not preferred, because I want complete all on keyboard)
Probably, it's a very rare case, hope someone helps...
thanks!
I know it is possible to remove the QuickType keyboard of a UITextView or UITextField, by using .autoCorrectionType = .No , but this also disables auto-correct and autocompletion while the user is typing.
Is there a possible work around to this?
I'm trying to make a very clean note making app and have an accessory to the keyboard, that looks ugly with the quicktype bit.
I don't think what you are asking. Is possible but even if it were - is that a good idea?
You may not like how it looks but allot of people really like that feature and might not like it if you remove it.
Users who don't like that can turn it off in the phone's settings so if your user does have it - there is a good reason to keep it there
I am creating a keyboard extension for ios
I just want an scroll strip at the upper part of the keyboard which would be some say some emojis.
But i want the native keyboard functioning as usual , jut a view on top of keboardview.
Do i need to implement the whole native keyboard ?
What the easy way to achieve this.
Please guide
Thank you
You can use inputAccessoryView
Please refer
What you want simply can't be done in the current version of iOS (9.2). If you want to add functionality to the keyboard on a systemwide basis, you have to implement it all yourself, including the keyboard.
Keyboard height, that available in Keyboard extension is to small for inserting suggestions bar there. I found that several users on AppDevForum offered to use AccessoryView. But for using it we need access to TextField, with seems as impossible, eventually now. So does someone know how to get that access or how to solve this problem?
I think it's Apple's intention to not allow 3rd party keyboard to render beyond the default area, any hack way of doing it may cause rejections during app review... But try UITextDocumentProxy see if you can access text view from it?
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