Frame geometry macros to improve your UIKit code

Frame geometryI find myself doing more and more dynamic UI layout in iOS apps these days. When elements of a UI need to resize to fit their contents, or move to accommodate other elements, the layout code can get complex and verbose. We’ve developed a set of Objective-C UIKit macros that help make this code more readable, self-documenting, and easy to change.

When a view is offset from another view, you might write something like this:

someView.frame = CGRectMake(someOtherView.frame.origin.x + someOtherView.frame.size.width + padding...

These macros help make that code more concise and scannable:

someView.frame = CGRectMake(RIGHT(someOtherView) + padding...

You can download the macros from our TBMacros Github repo. First let’s take a look at an example Continue reading

Objective-C Blocks Cheat Sheet

iOS Blocks Objective-CBlocks are an incredibly powerful addition to Objective-C, introduced in iOS 4. However, their syntax can be maddeningly difficult to remember. Matt Gallagher has an excellent post that breaks down the syntax to help you understand it. If you haven’t read this article, go do it now.

Even after working with blocks for a while, I still get tripped up. So I created the cheat sheet below, which I frequently refer to when declaring blocks. Continue reading

Kickstart your apps with the iOS Xcode Starter Project

We created the iOS Xcode Starter Project to make it quick and easy to start a new iPhone or iPad app. Our goal was to create a template to save the hours of effort it takes on a new project configuring essential open source libraries, the unit and functional testing environments, analytics, multiple targets, multiple app IDs (for development and production), and so on.

Starting a new project with the iOS Xcode Starter Project couldn’t be easier: Continue reading

Block initialization for testability and reuse

BlocksSince Apple introduced block support in iOS 4, more and more APIs are moving from delegation to block callbacks. While block callbacks can be declared inline, in most cases you should initialize your block callback in a method that returns the block. This keeps the code that calls an external API succinct, allows you to reuse the block in different contexts, and makes it easier to unit test the code in the block.

Let’s see what this looks like in practice.
Continue reading

Verbally in the iPad App Store

VerballyFor the past few months I’ve been working with Intuary on a new iPad app aimed at people who’ve lost the ability to speak. Verbally went live last week and had a spectacular first couple of weeks, with nearly 4,000 downloads and counting. It’s in the top-10 free medical apps in several countries (including the US, currently #4), and continues to be the #1 free medical app in Canada. Today it’s featured in New and Noteworthy.

If you don’t have it yet, you can get it here. And if you know someone whose ability to speak is limited by a disease such as apraxia, ALS, stroke, traumatic brain injury, cerebral palsy, Parkinson’s, or muscular dystrophy, please share it with them.

Verbally

Before the iPad, devices in the assistive and augmentative communication (AAC) space were (and continue to be) expensive, hard to acquire, and clunky. The iPad changes that–it’s a small fraction of the cost of medical AAC devices, and it presents a much lower barrier to entry for developers and UI designers. As a result, there are a handful of AAC apps on the iPad store, though for the most part they’re still relatively expensive and not terribly intuitive. Intuary saw an opportunity to improve the situation with a more accessible, more intuitive solution.

Verbally’s main goal is to help you be heard. One of the biggest challenges in AAC applications is that it’s very difficult to type at the pace of spoken conversation. We addressed that in a few ways:

  • The word grid provides buttons for the most commonly used words in conversation.
  • Prediction buttons predict the most likely next word, based on what you’ve typed and your usage patterns.
  • Users can import their address book to add the names of people, companies, and locations to the predictions.

Square keyboardThese features can reduce the number of taps required to enter text to be spoken by about half. We’re continuing to optimize the prediction algorithm and UI to cut that even further.

Since the app is designed to be used on the go, we also provide right- and left-handed keyboards so users can hold the iPad in one hand and type with the other.

In a group situation, it can be challenging for the person who can’t speak to get the attention of others. We’ve added a few features to help with this:

  • A chime button plays a short chime to get others’ attention.
  • A “speak each word” mode speaks the words as they’re entered, keeping the focus on the speaker even while they’re typing.
  • A repeat button offers easy access to repeat the previous spoken phrase, in case it wasn’t heard.

Feedback

We’ve already received some great feedback, both in email and iTunes app store reviews. Here are a couple of reviews we really liked:

“My patients will love this app…typically similar speech and communication devices cost thousands of dollars. Patients will be able communicate without spending a fortune!” — Dr NT

“This is the best AAC app for those with literacy skills that I’ve seen by far! The word and phrase feature are excellent, but the really wonderful thing, is that it can imports all your contact information and add those name and addresses to the word prediction set! Pure genius!” — china1919

Intuary

Intuary is a small San Francisco startup in the mobile applications space. Verbally is their first app. Intuary has been a real pleasure to work with. They really get agile development, both in terms of responding to change and managing priorities, and in making the best use of resources. They’re also committed to serving this market. We’re looking forward to continuing to work with them on improvements and enhancements to Verbally, as well as the other apps in their pipeline.