How create popup button in xcode? - ios

I want to create a custom keyboard, and I want to add more characters on it. if user long press a button it show more characters. like IOS default keyboard shows popup button after long press.

I created a very complex keyboard a few months ago where every key needed to have at least 5 different variations (Amharic dialect). I found that many pop ups do not work very well as they don't pop up over the top of the keyboard, I looked at how other keyboards achieved this but couldn't find a way to make it work. You can see a question on this problem here.
As a work around I created my custom keyboard with an extra row on the top, this was normally filled with numbers but on a long press would switch to show the alternative keys available. On long press the key pressed would be added to the field and if they chose on of the alternatives it would then replace the first key.
To give you a better idea here are some images:
Regular Keyboard:
Long press:
NOTE: Excuse the poor quality but I could only find an intermediate version of the project to screen print.
While working on this project I found that pop ups were a lot more difficult to achieve than this. I researched creating my own pop ups with bezier paths and also using pop ups themselves with the CYRKeyboard Button. (Note although the CYR gif shows the exact functionality required I found this gif to be extremely misleading). But in the end I came back to the above solution which worked very smoothly, quickly and easily.
Hope this helps

Related

how to implement drag and drop like shortcuts which developed by apple?

I know how to enable drag and drop for tableview in iOS. But the default behavior of it looks strange. User must press a cell for a long time to enable drag. I have read some answers said that changed the minimumPressDuration to 0.1. I had tried this way, but I don't think it's good enough.
What I want likes shortcuts app showed which is simulously.

Unable to get navigation bar to appear in xcode, double click doesn't register

I was working through the swift tutorial:
https://www.raywenderlich.com/115279/swift-2-tutorial-part-2-a-simple-ios-app
On the section (about 1/3 way down)
But I'm noticing a problem when I attempt these steps in my xcode environment. I am able to successfully embed a navigation bar, but "double clicking" doesn't allow me to set the text at all, in fact it really doesn't let me do anything just highlighting the nav bar region:
See:
I can also put up code at request, but being this is so early in the project, I haven't coded really anything yet, it seems more like a UX challenge. Am I missing some particular setting in Xcode editor that allows the text to be highlighted, or has the guide skipped some trivial, but necessary step to making this work?
#sschale's answer is a good solution:
For user's that come across the post, it isn't obvious where that menu is. After some digging I found that you need to hit a certain middle icon (in the red box) so it is blue to find the form. Image attached:
Sometimes it can be hard for it to register there. You can edit it in the right sidebar directly, when the Navigation Item is selected:

Customising the Decimal pad in my app

Swift...
So I've got an existing app and I'm working on its appearance. The current task is customising the decimal pad that pops up when the user hits a textField.
I've looked around on how to make it but it always seems that you have to go into the iPhone/ipad settings and add the custom keyboard.
eg. This StackOverFlow Question
and they all seem to point to this same tutorial..
iOS 8: Creating a Custom Keyboard
My problem is that I don't want the user to have to go into settings.
So the question is....IS THIS POSSIBLE?
The following pic is what I want to use. I have made this in an XIB file through adding a target keyboard which makes the new folder with KeyboardViewController.swift , info.plist and NumPad.xib. Though i think I'm on the wrong track, can someone point me the right way please.
Also anyone know the exact dimensions this view should be.. assuming what I'm asking is in fact possible. Let me know if I'm not being clear enough!
NumPad.xib(pic)
Many many thanks,
Steve
SOLUTION: Thanks to Andrea for correcting my search keywords. It led me to this Stack Question which hopefully sends some others to the correct end of the internet that have mistakes custom keyboard with custom input views!
Sure it is possible without going into settings, but they are called custom input views.
You should look into inputViews here what Apple says about them Custom views for data input.
Basically when the user press a text field instead of loading the usual keyboard it loads an inputView that you specify, pay attention that custom keyboard term is misleading. If you google for tutorial you'll find most probably link like the ones that you found.
For a practical example check this tutorial or this, is a little bit old, but the principle are still the same

Custom keyboard: stability

I created some custom keyboard, and although I wasn't able to really test it I have an impression that my keyboard is extremely unstable on device.
In some cases it just isn't loaded in app (I have it with Telegram messenger; when my keyboard is active and I'm trying to open Telegram I don't have any keyboard at all from time to time; to fix it I have to open any other app with keyboard input and go back to Telegram).
In some cases it is unloaded without user's interaction.
In some cases it is shown in keyboards list (not in the settings, but after the long tap on the switch keyboard button) as "(null)-myKeyboard". Sometimes it happens just after install (but if I'm just wait for, like, a minute — it will work)
In some cases — and this one worries me the most — my keyboard is removed from the active keyboards list in Settings.
When it works, it works. But it is obviously not very usable.
My keyboard is written in Swift (a bunch of buttons with a lot of NSLayoutConstraints, all written in code); I'm using Realm to store some constants; I have like 3-4 small images on buttons; I need full access for my keyboard.
Could you please give me some directions? What could be the problem here, and what is the best way to find it?

IOS prev/next button close keyboard unexpectedly

I'm currently using PhoneGap (Cordova) to build an App on iPad/iPhone.
One of my page in the app (in html/css/js), have more than 100 input type Number.
When i use finger to target each of them, it's working like a charm.
But when i use the prev/next button from IOS Keyboard, sometime, i don't know why, keyboard slide to down and when i try to open it again with targeting a input with my finger keyboard just blink... Impossible to fixe it without a scroll to release all event.
I've clean my code, refactored some part, look on google and stackoverflow if someone had the same problem but i found nothing...
Did someone know if it's a UIWebView problem ? Or phoneGap? or something else?
Thank's for reading.
If you are happy to just remove the next/previous buttons from your app entirely, the new Phonegap/Cordova 2.6.0rc1 has made this incredibly simple.
In your config.xml file, just set the HideKeyboardFormAccessoryBar preference to true.
In order for those two buttons to work you need to specify their behavior and it seems that it is not specified. Made some research and I think you have two options. Either you get rid of the next/previous buttons at all like explained here or you override textFieldShouldReturn: in a way similar to what is described in this post.

Resources