Gavin Miller is a local Calgary iPhone app developer who will be gracing yycapps with a series of tutorials on app development. This is his second in what we hope will be a series of great articles, so enjoy.
One of the finer points of iPhone development that can escape developers is the aspect of touch. No, not the obvious stuff like touch the screen and make something happen, but the subtler details like someone is using their finger when they interact with your app, not a mouse.
Touch is such a tactile action, and your app needs to respond as if it were a real tactile material, not just a piece of software. When you’re providing good feedback to someone using your app you’re setting your app up for success.
To illustrate this point I’m going to draw an example from one of my own apps.
During the creation of myDomains, I had a UISegmentedControl that when touched would launch one of two views depending on the segment touched. One of the things that I quickly noticed was that the touch action and immediate switch to a new view was very jarring. The user had no time to see that their touch had taken place.
To work around this I added a delay to the UISegmentedControl to allow the user to see that the touch was picked up by the app. The delay was only a quarter of a second, but it was enough for the segment to light up and report the touch to the user.
Here’s a video of the code in action (download the code for this example here):
Notice that when the top delayed row is touched, you’re able to see the segment button depress. Whereas when the bottom regular row is touched the alert shows immediately. This code allows the user to clearly see that the alert is a result of a touch, and provides that tactile feedback they’re looking for.
Now slow down there cowboy! I’m not saying to go and rewrite your code to use a delay in all places. That would be wrong. Apple has worked hard to provide a well tested set of controls and view transitions. But there are times when an interaction doesn’t feel right; whether it’s too abrupt, surprising, or jarring, in which case you now have a new tool to try on the problem.
Leave a Reply