Tải bản đầy đủ (.pdf) (19 trang)

Programming the iPhone User Experience phần 10 ppt

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.21 MB, 19 trang )

A requirement for most Cocoa Touch web application clients is to provide authenti-
cation credentials, such as a username and password, for an account on the remote
web service with which the mobile application interacts.
The bouncer anti-pattern occurs when the Cocoa Touch application requires authen-
tication credentials for operation, but doesn’t offer the option for creating those
credentials inside the application. Instead, the application opens Safari and forces reg-
istration through a web page, or worse, offers no option for registration at all.
There are cases in which registration from a mobile application makes little sense. For
example, an application that allows you to check the balance in your savings account
or retirement fund would require that the accounts already exist at the financial insti-
tution. The WordPress application requires external authentication using a WordPress-
powered blog hosted on the Web. Because of this externality, creating an account using
only the iPhone application would be impossible. Rather than simply blocking access
for new users, the WordPress application allows access to information about the
application and about WordPress. Figure 9-11 shows the WordPress application.
Figure 9-11. The initial screen for new users of the WordPress application
Most web
applications are technically capable of allowing registration from any HTTP
compatible client, including Cocoa Touch applications. The ability to register from an
application may be limited by the terms of service. If policy prevents registration,
applications should state as much and offer details on acceptable registration processes
or sites.
The LinkedIn and Facebook applications are good examples of applications that
implement the bouncer anti-pattern. Figure 9-12 shows the LinkedIn and Facebook
158 | Chapter 9: UX Anti-Patterns
Download at Boykma.Com
Simpo PDF Merge and Split Unregistered Version -
applications after launch. Each application assumes that the user is familiar with the
purpose of the application and either has or knows how to attain credentials to use the
application.
Figure 9-12. The welcome screens for the LinkedIn and Facebook applications


An excellent
example of an application that avoids the bouncer pattern is Foursquare.
The authors of Foursquare developed the application with usability in mind and avoi-
ded the bouncer pattern in a simple, clean manner. Figure 9-13 shows the welcome
screen for the application.
Figure 9-13. The welcome screen for the Foursquare application
The Bouncer | 159
Download at Boykma.Com
Simpo PDF Merge and Split Unregistered Version -
Gesture Hijacking
The iPhone and iPod Touch train users to use specific gestures or finger motions to
trigger certain actions. Swiping a finger from left to right across a cell in a table should
tell the application to delete that cell and the information it represents. Pinching two
fingers together while touching the screen should zoom the current view out, or reduce
its size, proportional to the distance the fingertips move toward each other. A reverse-
pinch should trigger the inverse effect.
Gesture hijacking occurs when a developer changes the meaning of these well-known
gestures. Often, the implementation is innocent. A developer may simply want to in-
troduce a novel method of interaction into an application and may not realize that they
have collided with the user expectation of consistency. For example, an implementation
may rework the built-in handling of swipes in table cells and, instead of triggering a
deletion, allow users to “flick” the interface to the left to drill down to the next level in
a hierarchy. This might be interesting, but could frustrate users accustomed to inter-
acting with tables in the normal way.
Figure 9-14 shows an example of gesture hijacking in Tweetie. Swiping a cell in a table
doesn’t trigger the standard deletion behavior; instead, it uses nice animation effects
to reveal an underlying set of controls relative to that table cell. The supplemental
controls do not include a control for deleting the cell or its associated object—a fact
that pushes the feature into the hijacking category. Though the feature is very inter-
esting, it contributes to an uncertainty around an otherwise standard gesture. This may

be great for the application, but can be detrimental to the overall user experience.
Figure 9-14. The gesture hijacking pattern as used in Tweetie
160 | Chapter 9: UX Anti-Patterns
Download at Boykma.Com
Simpo PDF Merge and Split Unregistered Version -
Users welcome interesting new implementations of Multi-Touch technology and un-
derstand that iPhone and iPod Touch applications are often quite innovative. Still,
novelty should always be balanced with expectations. The swipe, flick, pinch, and
reverse-pinch gestures should be used consistently, and applications should introduce
new gestures for new features.
Memory Lapse
Network-aware applications, such as RSS readers or clients for sites like Twitter and
Digg, inherently depend on an Internet connection. Without web access, the data they
display is off-limits.
The first time users launch such an application, they probably expect a load operation
of some sort, preferably with a progress indicator to show that the application is doing
something in the background. Notice should be given not only that a download is in
progress, but also whether or not the download is successful. In most cases, a successful
operation will simply display the downloaded data. Failures can be communicated with
an icon, as in Twinkle, or with passive messaging, as in Shovel.
Figure 9-15 shows the first launch and network sync for the TED application. The
translucent overlay and status indicator tell the user that the application is actively
communicating with the TED web services, while the underlying screen gives a preview
of the type of content. This approach is preferable to that taken by many applications
that fail to store information when applications close, requiring users to have a network
connection to continue reading content they have already downloaded at least once.
Figure 9-15. The first launch and network sync for the TED application
Memory Lapse | 161
Download at Boykma.Com
Simpo PDF Merge and Split Unregistered Version -

After the first successful download, user expectations change. Users expect that appli-
cations will store downloaded data between launches. This expectation comes from
the overall feeling on the iPhone or iPod Touch that applications don’t start and stop,
but rather are paused, waiting for users to switch them back to the forefront.
Generally, an application should not forget data—especially the most recent data suc-
cessfully downloaded. Users should not be penalized for changing albums, making a
phone call, answering a text message, or otherwise closing an application. The appli-
cation should provide the same functionality when reopened as when it was last closed,
despite access to networks.
Figure 9-16 shows the result of launching both Shovel and Tweetie in the absence of a
network connection. Users would likely benefit from an option to read content from
the most recent successful sync.
Figure 9-16. The network error handling in Shovel and Tweetie
The Facebook application
uses a disk cache and does an excellent job of avoiding the
memory lapse anti-pattern. Any data loaded into the Facebook application is saved to
disk and redisplayed when the application is opened. This approach works very well
to provide value to users without a network connection. It also has the side effect of
improving speed for users who are online, because data is only pulled from the network
if it is outdated or missing; otherwise, it’s served from the cache.
When the Facebook application is asked to display content that is not cached and there
is no network connection, users are given a clear but non-disruptive notice. Fig-
ure 9-17 shows the Facebook application responding to a request for data that cannot
be located.
162 | Chapter 9: UX Anti-Patterns
Download at Boykma.Com
Simpo PDF Merge and Split Unregistered Version -
Figure 9-17. The error screen for unavailable data in the Facebook application
Developers of
networked applications should work to avoid the memory lapse anti-

pattern. Mobile applications are far more likely than desktop applications to encounter
unfavorable network conditions. A good rule of thumb for data persistence is to ensure
that your application can be opened on an airplane or on the New York City subway
and still provide value to your users.
The High Bar
Progressive enhancement methods are ideal for providing supplemental functionality
to users. Software developers can delight users by including supplemental features that
add fun, novelty, or additional efficiency for task-oriented users.
The high bar anti-pattern is present in applications that limit the ability to accomplish
tasks for users not meeting certain external criteria. Examples are applications that:
• Force users to shake their device to delete information.
• Require network connectivity for operations that could be accomplished offline.
• Require Multi-Touch input for essential operations and fail to provide secondary
controls for users who are disabled or have only one free hand.
• Require precision input by presenting small input controls or small margins of error
for touches and gestures.
The opportunities for the high bar anti-pattern are endless. When developing an
application, designers and developers should try to empathize with mobile users,
The High Bar | 163
Download at Boykma.Com
Simpo PDF Merge and Split Unregistered Version -
imagining themselves in various disparate scenarios: in the passenger seat of a car;
carrying grocery bags; jogging on a treadmill; lying in bed; flying on an airplane; using
the New York City subway system; having physical disabilities. Desktop and mobile
applications differ primarily in their use cases. Accessibility is an important consider-
ation in desktop software, but developers can rely on controlled environments and
supportive technologies for the physically impaired. Mobile application developers
should provide value for users operating in the least friendly conditions. The scope of
progressive enhancement concerns must expand to include not only physical disability,
but also environmental disability.

Sound Off
The direct ancestor of both the iPhone and the iPod Touch is the iPod. Apple has taken
great care to ensure that both devices continue the legacy of the iPod by providing users
with an elegant and familiar interface for playing audio. The interaction between
applications, the operating system, and the iPod application has been carefully designed
to allow interoperation without diminishing the value of the user experience.
The iPod application recognizes incoming telephone calls and fades to silence to let
users answer and take part in conversations. When a call is disconnected, the iPod
application fades the audio back in and resumes playback at the last known point in
the track. If the iPhone receives a text message while the user is listening to music, the
SMS alert sound plays along with the current song. All standard notification sounds
work in the same fashion.
The sound off anti-pattern occurs when applications take exclusive control of the audio
features of the device despite the preferences of the user.
Games are particularly guilty of implementing the sound off anti-pattern. Many games
include rich sound effects and audio tracks. In an attempt to avoid auditory chaos,
developers often give their applications exclusive use of the audio output mechanism,
effectively silencing the iPod against the wishes of the user.
The Cocoa Touch audio frameworks allow developers to take control of the audio, but
the practice is generally undesirable. Instead, developers should ask users for their
preference. An excellent example of the user-centric approach is the game Flight Con-
trol. When the application launches, Flight Control asks if you wish to listen to your
own music or listen to the audio provided by the game. (A third possible option would
be to intermix the sounds, but for games with lots of sound effects, the result of mixing
those sounds with the current song playing in the iPod application could be
unpleasant.)
In this way, Flight Control offers two distinct, viable options. Most importantly, the
game developers have shifted the power to choose from the application to the user.
Figure 9-18 shows the sound management screen of the Flight Control game.
164 | Chapter 9: UX Anti-Patterns

Download at Boykma.Com
Simpo PDF Merge and Split Unregistered Version -
Figure 9-18. The sound management screen of Flight Control
Developers should
consider the importance of the iPod application in typical mobile
use cases and attempt to incorporate the user’s desire to listen to music while playing
games or using applications. Implementing exclusive locks on the audio output mech-
anism effectively removes the ability to use the iPhone or iPod Touch as a music
player—a distasteful choice for many users.
Sound Off | 165
Download at Boykma.Com
Simpo PDF Merge and Split Unregistered Version -
Download at Boykma.Com
Simpo PDF Merge and Split Unregistered Version -
Index
A
accelerometer, 137–138
accelerometer sensor, 10
accelerometer:didAccelerate: method, 138
accessoryView view (table cells), 121, 122
accuracy (touch), 62–68
action sheets, 152
active indicators (tables), 122
addTarget:action:forControlEvents: method,
69, 90
alerts, 152
alphabetical lists, index ribbon for, 22
ambient light sensor, 10, 14
AmbientSound category, 144
anti-patterns, 147–165

app as OS, 155–157
billboards, 147–150
bouncers, 157–159
bullhorns, 152–154
gesture hijacking, 160
high bar, 163
memory lapse, 161–163
sleight of hand, 150–151
sound off, 164
spin zone, 157
app as OS anti-pattern, 155–157
App Store
application categories, 19
lazy loading, 130
network failure notification, 154
rejection from, 13
AppKit framework, 1
Apple HIG (see HIG; mobile HIG)
application data, saving, 126
application icon, size of, 15
application interaction patterns, 83–87
combination interfaces, 87
command interfaces, 83
modal interfaces, 85
navigation interfaces, 85
problematic (see anti-patterns)
radio interfaces, 84
application templates, 24, 27–35
Core Data templates, 35
for immersive applications, 25

for light utilities, 25
for productivity applications, 24
view controllers, 29–34
application types, 19–25
immersive applications, 25
light utilities, 24, 94
productivity tools, 20–24
applicationDidBecomeActive: method, 48
applications
first experiences with, 17, 161
launch images, 15, 44
sharing data between, 54–55
starting and quitting, feel of, 15
applicationWillResignActive: method, 47
applicationWillTerminate: method, 48
arbitrary shapes, interaction with, 74
archiving, classes for, 9
assisted scrolling, 22
audio functionality, hijacking, 164
Audio Queue Services, 143
audio support, 140–145
audio units, 143
AudioServicesPlayAlertSound function, 142
AudioServicesPlaySystemSound function, 141
We’d like to hear your suggestions for improving our indexes. Send email to
167
Download at Boykma.Com
Simpo PDF Merge and Split Unregistered Version -
authentication credentials, obtaining, 158
AVAudioPlayer class, 143

B
background processes, disallowed, 37
baseline features (see progressive
enhancement)
battery level indicator, 154
billboard anti-pattern, 147–150
Birdfeed application, 85, 86
Black and White application, 153
bouncer anti-pattern, 157–159
bullhorn anti-pattern, 152–154
button controls, 91–98
modal buttons, 98–100
buttons
info (“i”) buttons, 94
physical (on device), 10
size of (see fingertip size, designing for)
buttonWithType: method (UIButton), 91
C
caching before termination, 51
caching data, 126
memory lapse anti-pattern, 161–163
user input, 127
Calculator application (built-in), 24
canOpenURL: method, 54
categories of audio sessions, 144
CFBundleURLTypes key, 53
CGPoint values, 62
classes, 2
control classes, 88–91
control classes, standard, 91–114

controller classes, 29
Foundation class tree, 5
registering with UIControl descendants, 89
UIKit framework, 2–3
CLLocationAccuracy key, 136
CLLocationManager class, 134
CLLocationManagerDelegate protocol, 135
Clock application, 84
cloud-based processing, 55
Cocoa Touch, about, 1–10
Foundation framework, 2, 4–9
garbage collection, 9
human interface guidelines, 13
UIKit framework, 1, 2–3
Cocoa Touch applications (see entries at
application)
collection management classes, 5
combination interfaces, 87
command interfaces, 83
connectivity (network), 126–133
alerting users about, 128
caching user input, 127, 161–163
lazy data loading, 129–132
maintaining state and persisting data, 126
memory lapse anti-pattern, 161–163
peer connectivity and GameKit, 132
connectivity (peer), 132
Contacts application
modal buttons in, 98
Ringtones screen, 106

Contacts application (built-in), 20, 33
contentView view (table cells), 121
control accessories (tables), 122
control events, 89
control types, 91–114
buttons, 91–98
modal controls, 98–100
search bars, 109
segmented controls, 111–114
sliders, 103–104
tables and pickers, 106–109
controller classes, 29
controllers (see view controllers)
controls, 88–91
scrolling controls, 114–120
segmented, 111–114
tables and embedded controls, 120–123
target-action mechanism, 89
touchable, size of, 62–64
cooperative single-tasking, 17, 37–56
custom protocol handlers, 17, 52–54
handling interruptions, 47–48
handling terminations, 47, 51–52
launching quickly, 43–47
push notifications, 55–56
shared data, 54–55
Core Data
lazy loading with, 131
for saving application data, 126
templates, 35

Core Location framework, 133–137
credentials, obtaining, 158
custom protocol handlers, 17, 52–54
168 | Index
Download at Boykma.Com
Simpo PDF Merge and Split Unregistered Version -
D
data caching, 126
memory lapse anti-pattern, 161–163
user input, 127
data loading, lazy, 129
data persistence, when no connectivity, 126
data sharing between applications, 54–55
Default-scheme.png file, 44
Default.png file, 44
desiredAccuracy property, 136
detail disclosure buttons, 122
detail views (productivity applications), 23–24
detecting touch
with arbitrary shapes, 74
gesture hijacking, 160
multiple touches, 70
swipes and drags, 72
taps, 68–69
touch and hold, 70
device specifications, 10
didRotateFromInterfaceOrientation:fromInter
faceOrientation: method, 140
disclosure buttons, 122
disclosure indicators, 121

dismissive gesture (swiping), 73
disruptive notifications, 153
distanceFilter property, 137
double taps, detecting, 69
Draggable class, 72
drags, detecting, 72
E
EAGLContext class, 34
EAGLView class, 34
embedded controls, 120–123
active indicators and control accessories,
122
disclosure indicators, 121
enlarged virtual hit areas, 64
events (in response to touches), 60, 89
exit processes, managing, 51–52
F
Face Melter application, 84
Facebook application, 151, 158, 162
failure states, notification of, 16
file system classes, 7
filesystem IO, 16
fingertip size, designing for, 15, 23, 62–68
first impressions of applications, 17, 161
Flickr-like applications, 55
Flight Control application, 164
focus interruptions, handling, 47–48
Foundation framework, 2, 4–9
garbage collection and, 9
Foursquare application, 84, 159

frameworks for Mac OS X programming, 1–9
G
GameKit framework, 132
games, 34
audio hijacking, 164
as immersive applications, 25
garbage collection, 9
gesture hijacking, 160
H
haptic feedback, lack of, 150
hardware feature abstractions, 4
hardware power button, 10
HIG (Human Interface Guidelines), 11, 13
(see also Apple HIG; mobile HIG)
deviating from, risk of, 13
high bar anti-pattern, 163
hitTest:withEvent: method, 64, 66
hold (after touch), detecting, 70
home button (depressible), 10
hot area for touches, 63
Human Interface Guidelines, 13 (see HIG;
mobile HIG)
I
“i” buttons, 94
icon size, application, 15
image at launch (see launch image)
ImageSearch application (example), 38
handling interruptions, 48
handling terminations, 51
launching quickly, 45–47

imageView view (table cells), 121
immersive applications, 25
games, 148
sound off anti-pattern, 164
index ribbon for logically ordered lists, 22
info buttons, 94
Info.plist file, 53
Index | 169
Download at Boykma.Com
Simpo PDF Merge and Split Unregistered Version -
input caching
memory lapse anti-pattern, 161–163
instant message client (example), 55
interaction patterns, 83–87
combination interfaces, 87
command interfaces, 83
modal interfaces, 85
navigation interfaces, 85
radio interfaces, 84
interface controls (see controls)
interface interaction patterns
problematic (see anti-patterns)
interfaceOrientation property, 139
interprocess communication (IPC) classes, 7
interruptions, handling, 47–48
IPC classes, 7
iPhone device, about, 10
iPhone Human Interface Guidelines (see mobile
HIG)
iPhone SDK, 13

iPod application, 141
sound off anti-pattern with, 164
iPod Touch device, about, 10
irregular shapes, interaction with, 74
K
kCLLocationAccuracy- values, 136
keyboard (onscreen), 64
L
landscape orientation, switching to portrait,
139–140, 157
launch image, 15, 44
launch states, 15
launching of applications, 43–47
example application, 45–47
feel of, 15
first-time experience, 17, 161
lazy data loading, 129–132
light sensor (see ambient light sensor)
light utilities, 24, 94
LinkedIn application, 158
LiveAudio category, 144
loading data lazily, 129–132
location awareness, 133–137
locationInView: method (UITouch), 59
locationManager:didUpdateToLocation:from
Location method, 136
locking, classes for, 7
logical controllers, 4
logically ordered lists, index ribbon for, 22
login requests, managing, 158

M
Mac frameworks, 1–9
Mail application, 128, 155
mailto:// URL scheme, 155
maintaining state when no connectivity, 126
managed objects, 131
Maps application, 136
MediaPlayback category, 144
memory lapse anti-pattern, 161–163
mobile HIG, 12–18
deviating from, risk of, 13
progressive enhancement, 16
seamless interaction, 15–16
single user experience, 13–14
modal alerts, 152
modal controls, 98–100
modal interfaces, 85
combined with other interfaces, 87
ModalButton class, 98–100
ModalButtonViewController class, 99
Multi-Touch interface, 57
multiple taps, detecting, 69
multiple touches, detecting, 70
multitasking, 37
(see also cooperative single-tasking)
N
navigation controllers, 32–34
sleight of hand anti-pattern, 151
navigation interfaces, 85
combined with other interfaces, 87

navigation-based application template, 24, 30
navigation-based applications, 32, 33, 151
network communications, handling, 16
network connectivity, 126–133
alerting users about, 128
caching user input, 127, 161–163
lazy data loading, 129–132
maintaining state and persisting data, 126
memory lapse anti-pattern, 161–163
peer connectivity with GameKit, 132
when poor, 17
New Project dialog (Xcode), 28
170 | Index
Download at Boykma.Com
Simpo PDF Merge and Split Unregistered Version -
Notes application, 84
notification bullhorns, 152–154
notifications, classes for, 9
notifications on network connectivity, 128
NSArray objects, 2
for saving application data, 126
NSDictionary objects, for saving application
data, 126
NSObject class, 2
numeric badges, 55
O
Objective-C language services, classes for, 9
objects (touchable), 62–68
overlapping views, 68
shape of, 66, 74

size of, 62–64
view placement, 67
OmniFocus application, 85
OpenAL framework, 143
OpenGL ES application template, 25, 34
openURL: method, 52
operating system services, classes for, 7
orientation, rotating, 139–140, 157
overlapping views, 68
P
paging, 114
pagingEnabled attribute (UIScrollView), 114
partial rotation support, 157
passive indicators, 121, 153
password requests, managing, 158
peer connectivity with GameKit, 132
persisting data when no connectivity, 126
phase property (UITouch), 58
Phone application (built-in), 52
Photos application, 73, 114
picker controls, 106–109
placement of views, 67
overlapping views, 68
PlayAndRecord category, 144
PNG file, as launch image, 15, 44
pointInside:withEvent: method, 64, 66
portrait orientation, switching to landscape,
139–140, 157
power button, device, 10
precision of use, expectations for, 15

previousLocationInView: method (UITouch),
59
productivity-focused applications, 20–24
detail views in, 23–24
scrolling in, 20–22
progressive enhancement, 11, 16, 125–145
accelerometer support, 137–138
audio support, 140–145
high bar anti-pattern, 163
location awareness, 133–137
network connectivity, 126–133
rotation support, 139–140
projects, starting new, 28
protocol handlers, custom, 17, 52–54
proximity sensor, 10
push notifications, 55–56
Q
quick-launching, 43–47
example application, 45–47
quitting an application
feel of, 15
handling terminations, 47, 51–52
R
radio interfaces, 84
combined with other interfaces, 87
RecordAudio category, 144
registering classes with UIControl descendants,
89
registration management, 158
resolution, device, 10

responder chain, 59–61
REST over HTTP, 127
Ring/Silent switch, 141
rocker switches, 10
rotation support, 139–140
partial, 157
S
Safari application, 155
sandboxes, 54
saving application data, 126
screen resolution, 10
scrolling
controls for, 114–120
in productivity applications, 20–22
seamless interaction, 15–16
Index | 171
Download at Boykma.Com
Simpo PDF Merge and Split Unregistered Version -
search bars, 109
searchBar:textDidChange: method, 109
searchBarSearchButtonClicked: method, 109
searchBarTextDidEndEditing: method, 109
segmented controls, 111–114
sensors, device, 10
setMultipleTouchEnabled: method, 60
Settings application, 134
shape of touchable objects, 66
arbitrary shapes, 74
sharedAccelerometer method, 138
sharing data between applications, 54–55

shouldAutorotateToInterfaceOrientation:inter
faceOrientation: method, 139
Shovel application, 126, 155, 162
showsHorizontalScrollIndicator property, 114
showsVerticalScrollIndicator property, 114
signal strength indicators, 128
single taps, detecting, 68
single user experience, creating, 13–14
single-tasking (see cooperative single-tasking)
size, fingertip (see fingertip size, designing for)
size of application icons, 15
size of touchable objects, 62–64
sleep() function, abuse of, 148
sleight of hand anti-pattern, 150–151
slider controls, 103–104
snapshot, taking before termination, 51
SoloAmbientSound category, 144
sound (audio support), 140–145
sound off anti-pattern, 164
spin zone anti-pattern, 157
splash screens, 15, 44, 148
SQLite
lazy loading with, 129
saving application data with, 126
starting applications
feel of, 15
first-time experience, 17, 161
quickly, 43–47
state maintenance, 15, 126
status bar, when open, 48

status notifications, 16
push notifications, 55–56
Stocks application, 154
Streaks application, 148
stretchable images, 92
stretchableImageWithLeftCapWidth:topCap
Height: method, 92
string classes, 5
subordinate views, 24
success states, notification of, 16
swipe-to-delete gesture, 73
swipes, detecting, 72
gesture hijacking, 160
System Sound Services, 141
T
tab bar application template, 24, 25, 31
tab-based applications, 31
table controls, 106–109
tables, 120–123
active indicators and control accessories,
122
disclosure indicator, 121
tableView:accessoryButtonTappedForRowWi
thIndexPath: method, 123
tactile feedback, lack of, 150
tapCount property (UITouch), 58, 69
taps, detecting, 68–69
gesture hijacking, 160
target-action mechanism, 89
task management (see cooperative single-

tasking)
TED application, 87, 161
tel:// protocol handler, 52
templates for applications, 24, 27–35
Core Data templates, 35
for immersive applications, 25
for light utilities, 25
for productivity applications, 24
view controllers, 29–34
terminations, handling, 47, 51–52
themes (design), 149
Things application, 84
threading classes, 7
3D games, 25, 34
thumb, slider, 103
TileSearchViewController class, 109
timer, for handling touch and hold, 70
timestamp property (CLLocation), 137
timestamp property (UITouch), 58
touch and hold, detecting, 70
touch patterns, 57–74
accuracy considerations, 62–68
arbitrary shapes, 74
detecting multiple touches, 70
detecting taps, 68–69
172 | Index
Download at Boykma.Com
Simpo PDF Merge and Split Unregistered Version -
detecting touch and hold, 70
gesture hijacking, 160

responder chain, 58–61
swipes and drags, 72
touchable objects, 62–68
overlapping views, 68
shape of, 66, 74
view placement, 67
touches argument (touch event handlers), 70
touchesBegan:withEvent: method, 60, 69
touchesCancelled:withEvent: method, 61
touchesEnded:withEvent: method, 61, 99
touchesMoved:withEvent: method, 60
touchesMovied:withEvent: method, 72
track, slider, 103
tree-like graphs, 20
Tweetie application, 31, 147, 153, 160, 162
Twitterrific application, 149
U
UIAccelerometer class, 138
UIAccelerometerDelegate interface, 138
UIAlertView class, 152
UIApplication class, 54
UIApplicationDelegate protocol, 47
UIButton class, 91–98
info (“i”) buttons, 94
UIButtonType key, 91
UIButtonTypeInfoDark class, 96
UIButtonTypeInfoLight class, 96
UIControl classes, 88–91
standard control types, 91–114
target-action mechanism, 89

UIControlEvent class, 89, 103
UIControlEventTouchUpInside event, 99
UIControlEventValueChanged type, 103
UIControlStateHigh state, 92
UIControlStateNormal state, 92
UIDatePickerModeCountdownTimer class,
107
UIDatePickerModeDate class, 107
UIDatePickerModeDateAndTime class, 107
UIDatePickerModeTime class, 107
UIEvent class, 60
UIImageView objects, touch-enabled, 67
UIKit framework, 1, 2–3
UINavigationController class, 85
with navigation-based applications, 32
UIPickerView class, 106–109
UIResponder class, 2–3, 59
UIScrollView class, 114–120
UISearchBarDelegate class, 109
UISlider class, 103–104
UITabBar class, 84
UITabBarController class, 30
with tab-based applications, 31
UITableView class, 20, 106–107
index ribbon for alphabetical lists, 22
UITableViewCell class, 121
UITableViewCellAccessoryCheckmark key,
122
UITableViewCellAccessoryDetailDisclosureBu
tton class, 122

UITableViewCellAccessoryDisclosureIndicato
r class, 122
UITableViewController class, 30, 33
UITableViewControllerCell class, 33
UITableViewDelegate class, 120–123
UIToolBar class, 83
UITouch class, 58–61
UIView class, UIViewController and, 29
UIViewController class, 29
in modal interfaces, 85
in navigation interfaces, 85
rotation support, 139
with view-based applications, 30
URL handling classes, 7
URLs, custom, 17, 52–54
user experience (UX), 10, 14
anti-patterns, 147–165
guidelines (see HIG; mobile HIG)
interaction patterns (see application
interaction patterns)
touch patterns (see touch patterns)
user input, caching, 127
memory lapse anti-pattern, 161–163
user interface, importance of, 2
user interface controls (see controls)
user interface interaction patterns, 83
combination interfaces, 87
command interfaces, 83
modal interfaces, 85
navigation interfaces, 85

problematic (see anti-patterns)
radio interfaces, 84
UserInterfaceSoundEffects category, 144
username requests, managing, 158
utilities (light), 24, 94
Index | 173
Download at Boykma.Com
Simpo PDF Merge and Split Unregistered Version -
utility application template, 25, 31, 94
UX (see user experience)
V
value objects, 4, 5
vertical scrolling (see scrolling)
vibration, triggering, 141
view controllers, 29–34
view placement, 67
view property (UITouch), 58
view-based application template, 25, 30
view-based controller template
example application (ImageSearch), 38
views, overlapping, 68
virtual controls, 150
virtual hit areas, 64
placement of, 67
volume rocker switch, 10, 141
W
Weather application, 24, 95
willAnimateFirstHalfOfRotationToInterfaceO
rientation:duration: method, 140
willAnimateSecondHalfOfRotationToInterfac

eOrientation:duration:, 140
willRotateToInterfaceOrientation:toInterface
Orientation:duration: method, 140
window property (UITouch), 58
window-based Core Data application template,
35
WordPress application, 158
Wurdle application, 148
X
Xcode templates, 24, 27–35
Core Data templates, 35
for immersive applications, 25
for light utilities, 25
for productivity applications, 24
view controllers, 29–34
XML classes, 5
Z
z-axis, views overlapping on, 68
174 | Index
Download at Boykma.Com
Simpo PDF Merge and Split Unregistered Version -
About the Author
Toby Boudreaux has been developing for Mac OS X using Objective-C and Cocoa
since 2000. He has spoken at WWDC on the topic of Hybrid Cocoa/Web
applications—a very relevant topic for the iPhone. He is the CTO of The Barbarian
Group, an interactive/software shop based in the U.S. He focuses evenly on OS X/
iPhone application development and Web development, and acts as a mentor to his
team, liaison to his clients, and representative to the community. Toby has authored
and acted as technical editor for books and articles related to programming, and he
specializes in web development for consumer markets using open technologies and in

Mac/iPhone development.
Colophon
The animal on the cover of Programming the iPhone User Experience is a six-shafted
bird of paradise (Parotia sefilata), also known as a Western Parotia or six-wired bird of
paradise. The male of this species is 13 inches long with a short bill and black iridescent
plumage that varies between bronze, green, and purple. It has golden feathers on its
breast and silver feathers on its crown. From behind each eye spring the head wires—
each six inches long with a small oval tip—that give the bird its name. On the sides of
its breast are black plumes that, when elongated, make the bird appear to be double
its real size. As with most birds of paradise, the female is brown and unadorned.
Native to Indonesia, the six-shafted bird of paradise inhabits the mountain forests of
Western New Guinea, living on a diet of fruits and figs. During courtship, the male
performs an elaborate dance by shaking its head with its black plumes elongated to
show off its adornment. This bird is common throughout its range and is not considered
a threatened species.
The cover image is from Cassell’s Natural History. The cover font is Adobe ITC Gara-
mond. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed;
and the code font is LucasFont’s TheSansMonoCondensed.
Download at Boykma.Com
Simpo PDF Merge and Split Unregistered Version -
Download at Boykma.Com
Simpo PDF Merge and Split Unregistered Version -

×