How to Make a Gesture-Driven To-Do List App Like Clear: Part 3/3

This is a post by Tutorial Team Member Colin Eberhardt, CTO of ShinobiControls, creators of playful and powerful iOS controls. Check out their app, ShinobiPlay. You can find Colin on Google+ and Twitter This is the last in a three-part tutorial series that walks you through creating a simple to-do list app free of buttons, […] By Colin Eberhardt.

Leave a rating/review
Save for later
Share
You are currently viewing page 4 of 4 of this article. Click here to view the first page.

Contents

Hide contents

Separation of Concerns

Before you put down your tools, I want to make one more observation about the code. In the first part of this tutorial, you refactored the pull-to-add code so that it was no longer a subclass of the table view class. This allows the interaction to be added (or removed) via one simple line of code:

_dragAddNew = [[SHCTableViewDragAddNew alloc] initWithTableView:self.tableView];

The same is true of the pinch-to-add interaction.

Unfortunately, neither solution is quite as elegant as it might first seem. The SHCTableViewDragAddNew class sets itself as the delegate for the table view, and as a result, you cannot add any other interactive behaviors to the table that rely on receiving messages from the delegate.

What you really need here is some form of multicasting.

Image courtesy of kainet, used under Creative Commons ShareAlike license

As an open question to all readers, have you had this problem in the past? Have you ever wanted to add multiple classes as a delegate for a UI control? If so, I’d love to hear about it, because I have a solution in mind…

Where To Go From Here?

I hope you have enjoyed this tutorial and are inspired to think about how to make better use of gestures in your own apps. Resist the urge to rely on buttons, sliders, and other tired old user interface metaphors. Think about how you can allow your users to interact using natural gestures.

To my mind the key word here is natural. All of the gestures that you have added to this to-do list feel natural, because they result in a user interface that reacts to your touch in much the same way that real objects do. This is one of the most compelling features of a touch-based interface!

If you do use gestures, bear in mind that they might not be as discoverable as a more blatant "Click to Add New" button. Think about how you can improve their discoverability via contextual cues.

In this example, the cues have all been visual, but they don’t have to be! Why not try using sounds or vibration? But please, do so in moderation.

If you want to develop this to-do app further, why not try adding a reorder function, where a tap-and-hold gesture floats an item above the list, allowing it to be dragged around. Again, think about the physics of this interaction. The item being dragged should appear larger and cast a shadow over the other items in the list.

You can find the source code for the completed app on GitHub. If you do develop it further, why not fork the project?

Enjoy creating gesture-driven interfaces, and please share you stories and successes in the forum discussion below! :]


This is a post by Tutorial Team Member Colin Eberhardt, CTO of ShinobiControls, creators of playful and powerful iOS controls. Check out their app, ShinobiPlay.

Colin Eberhardt

Contributors

Colin Eberhardt

Author

Over 300 content creators. Join our team.