Custom Search

The Finger Is Not A Mouse - Itouch Programming

On the desktop, a user can use a variety of
input devices — such as an Apple Mighty Mouse, a Logitech trackball, or a laptop touchpad. But, on
screen, the mouse pointer for each of these pieces of hardware is always identical in shape, size, and
behavior. However, on iPhone and iPod touch, the pointing device is always going to be unique.
Ballerinas, for example, will probably input with tiny, thin fingers, while NFL players will use big, fat
input devices. Most of the rest of us will fall somewhere in between. Additionally, fingers are also not
nearly as precise as mouse pointers are, making interface sizing and positioning issues very important,
whether you are creating an iPhone/iPod touch – friendly Web site or a full - fledged iPhone/iPod touch
application.

Additionally, finger input does not always correspond to a mouse input. A mouse has a left click, right
click, scroll, and mouse move. In contrast, a finger has a tap, flick, drag, and pinch. However, as an
application developer, you will want to manage what types of gestures your application supports. Some
Figure 1-10: Application emulating Apple UI design
Chapter 1: The iPhone and iPod touch Development Platform
9
of the gestures that are used for browsing Web sites (such as the double - tap zoom) are actually not
something you want to support inside of an iPhone and iPod touch application. Table 1 - 2 displays the
gestures that are supported on iPhone and iPod touch as well as an indication as to whether this type
of gesture should be supported on a Web site or application. (However, as Chapter 5 explains in detail,
you will not have programmatic access to managing all of these inputs inside of Mobile Safari.)

Table 1-2: Finger Gestures
Gesture Result Web site App
Tap Equivalent to a mouse click Yes Yes
Drag Moves around the viewport Yes Yes
Flick Scrolls up and down a page or list Yes Yes
Double-tap Zooms in and centers a block of content Yes No
Pinch open Zooms in on content Yes No
Pinch close Zooms out to display more of a page Yes No
Touch and hold Displays an info bubble Yes No
Two-finger scroll Scrolls up and down an iframe or element
with CSS overflow:auto property
Yes Yes

Finally, several mouse actions have no finger touch equivalents on iPhone and iPod touch. These
include:
? No right - click
? No text selection
? No cut, copy, and paste
? No hover
? No drag - and - drop

By: iPodDepot

Article Directory: http://www.articledashboard.com

Dr PodMan is the developer and content writer for iTouch

© 2005-2011 Article Dashboard