Programming Pop-Up Text in an iPhone App
March 31, 2015 9:03 AM   Subscribe

I'm hoping to create an iPhone app that's a travel guide whose text pages will include some foreign terms. Users should be able to touch a foreign term to see a pop-up phonetic pronunciation. But the programmers I'm considering hiring say they're not sure how to do this, and suspect it might be expensive. Can anyone smart save the day and come up with a solution?

Here's an example. The transparency would be nice, but not absolutely necessary.
posted by Quisp Lover to Computers & Internet (10 answers total) 2 users marked this as a favorite
 
The term you are looking for is a "tooltip". Here is a stack overflow page describing a few solutions:

tooltips in ios

I would consider hiring other programmers if the ones you are talking to aren't sure how to handle this because it's by no means a hard problem to solve.
posted by meta87 at 9:20 AM on March 31, 2015 [9 favorites]


Professional iOS developer here, and I could probably hack up a quick prototype of this functionality in a day or two. In fact, I can list a bunch of iOS apps that already do something similar (for example, the Kindle app). These guys either don't know what they're doing or are trying to make it sound super hard to shake you down for more money to get it done. Either way, I'd find new programmers.
posted by Itaxpica at 9:23 AM on March 31, 2015 [4 favorites]


Echoing Itaxpica as a fellow professional iOS dev - you should be looking for new programmers. This is something that decent iOS developers should know how to do (or know how to figure out how to do). That said, it might be helpful to know what's meant by expensive.
posted by jeffch at 9:36 AM on March 31, 2015


All depends on where the phonetic database lives and who supplies it. I agree the actual mechanics of posting the tooltips are trivial, it's what's behind it...
posted by DesbaratsDays at 9:40 AM on March 31, 2015


Response by poster: Thanks, all. Itaxpica - I think it's honest ignorance rather than a shake-down. They've done good work for good clients, but it's been in a fairly narrow range, so they need to research stuff outside their range.

jeffch - The app is very basic, so they've quoted a low price (under $6000 including CMS), but with the caveat that until they determine the pop-up solution, they can't commit to a price range cap, since they don't know what's going to be required. I was posting here to try to help them find that solution.

DesbaratsDays - That's a major concern for them as well. The app's author can supply a table of terms and their respective phonetics, but the rigging of the DB is uncertain.

I haven't committed to them yet, so I'd certainly be open to speaking to other devs (I'd be grateful for referrals or self-intros via MeMail). Agreed, this is puzzlingly non-esoteric feature (I even pointed them to the Kindle app, myself).
posted by Quisp Lover at 9:47 AM on March 31, 2015


As others have said, the mechanics of the popover is extremely trivial. Apple provide their own, called a UIPopverController, although this only works on the iPad. There are literally hundreds of iPhone equivalents on Github though.

I'm guessing the problem they're having is how to 'tag' the word, have it perform an action to get the phoentic version on press, and then display it in the correct place. This is less trivial but still not exactly rocket science. Unfortunately, without knowing how they've built the text display bits, it's impossible to give any more solid guidance.

eg. Are they using a UIWebView to display formatted text? A lot of lazy developers use that method to display styled text in iOS. You'd then have to wrap the pressable words with a link and then capture a JavaScript event. If they've done it properly, then they will be using NSAtrributedStrings and a subclassed UITextView, which is more elegant, but more difficult to program.

Worst case is they've used Phonegap or similar. The theory is the same though. These would be useful things for you to ask and know in any case. Feel free to Memail me if you need any more guidance.
posted by derbs at 12:28 PM on March 31, 2015 [1 favorite]


Sorry meant to say, if it is the 'tagging' of the words that is their problem, you might want to point them in the direction of NSScanner or similar. With an NSSet full of subclassed NSString 'phonetic' objects you want to match?
posted by derbs at 12:36 PM on March 31, 2015


Response by poster: "Are they using a UIWebView to display formatted text?"

They haven't built the app yet. I haven't even hired them to build it yet. They are just spec-ing out the job, and have hit a bump on this aspect. Thanks for your input, hopefully it'll help!
posted by Quisp Lover at 1:36 PM on March 31, 2015


I think it's unlikely that they're unsure of how to display text in a popup window. Perhaps there is a misunderstanding in another facet of this.
- Do they think there needs to be spoken audio of the pronunciation?
- Do they think that the pronunciation needs to be generated automatically somehow (rather than manually tagging a word with its pronunciation)?

Otherwise, perhaps the CMS they plan to use for the backend isn't flexible and they're challenged on how to create a way that is simple for you to tag this extra information. Derbs covers some of the methods possible depending how the text will be captured and displayed to the end user. This tagging might take some extra dev time/budget, but it shouldn't be a major obstacle for any competent developer.
posted by Gomez_in_the_South at 3:28 PM on March 31, 2015


Response by poster: From the developers:


We do only native development. So a multiplatform service like PhoneGap or Xamarin is not an option for us. I agree that, for this kind of app, it could be less costly. But in our experience, the maintenance or expansion potential are significantly more difficult on the long run.

The problem is not to show a popover, it's when and where to show it. The WebView solution is the easiest, but takes away a bit of the native feeling. Although I don't think it would be noticeable in this context.

I had one of our devs do some research yesterday with the UITextView and UIInputProtocol ( the elegant solution ), which led to promising results. Again, I never said these features are impossible, it's just that it takes some effort and costs.

As for CMS, we build our own custom CMS, with .NET and MVC architecture. We do this because the focus is on the backend login and app feeds, not interface. And pre-made CMS solutions generally don't fulfil this purpose.

posted by Quisp Lover at 7:17 AM on April 1, 2015


« Older Emergency VOIP Service with no monthly charge   |   Positive experiences trying to conceive after 40? Newer »
This thread is closed to new comments.