Datasheet

11
Chapter 1: Introducing Safari/WebKit Development for iPhone 3.0
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-fi nger scroll Scrolls up and down an
iframe or element with the
CSS
overflow:auto property
Yes Yes
Limitations and Constraints
Because iPhone is a mobile device, it is obviously going to have resource constraints that you need to
be fully aware of as you develop applications. Table 1-3 lists the resource limitations and technical con-
straints. Whats more, certain technologies (listed in Table 1-4) are unsupported, and you need to steer
away from them when you develop for iPhone and iPod touch.
Table 1-3: Resource Constraints
Resource Limitation
Downloaded text resource (HTML,
CSS, JavaScript fi les)
10MB
JPEG images 128MB (all JPEG images over 2MB are subsam-
pled — decoding the image to 16x fewer pixels)
PNG, GIF, and TIFF images 8MB (in other words, width*height*4<8MB)
Animated GIFs Less than 2MB ensures that frame rate is maintained (over
2MB, only fi rst frame is displayed)
Nonstreamed media fi les 10MB
PDF, Word, Excel documents 30MB and up (very slow)
JavaScript stack and object allocation 10MB
JavaScript execution limit 5 seconds for each top-level entry point (
catch is called
after 5 seconds in a
try/catch block)
Open pages in Mobile Safari 8 pages
49667c01.indd 1149667c01.indd 11 10/9/09 8:04:23 AM10/9/09 8:04:23 AM