Apple QuickTime7_User_Guide.pdf Manuel
Apple sur Fnac.com
- Pour voir la liste complète des manuels APPLE, cliquez ici
-->
ou juste avant la balise de fermeture -->
TELECHARGER LE PDF sur :
http://images.apple.com/quicktime/pdf/QuickTime7_User_Guide.pdf
Commander un produit Apple sur Fnac.com
Voir également d'autres Guides et documentation APPLE :
Apple-InstrumentsUserGuide.pdf-manuel
Apple-Logic-Pro-9-TDM-Guide-manuel
Apple-macbook_air_users_guide.pdf-manuel
Apple-macbook_air-13-inch_mid-2012-qs_ta.pdf-manuel
Apple-AppStoreMarketingGuidelines-JP.pdf-Japon-manuel
Apple-macbook_pro_retina_qs_ta.pdf-manuel
Apple-ipad_user_guide_tu.pdf-manuel
Apple-ipad_user_guide_th.pdf-manuel
Apple-iphone_user_guide_gr.pdf-manuel
Apple-Nike_Plus_iPod_Sensor_UG_2A.pdf-manuel
Apple-ipad_manual_del_usuario.pdf-manuel
Apple-ipad_uzivatelska_prirucka.pdf-manuel
Apple-ipad_wifi_informations_importantes.pdf-manuel
Apple-Xsan_2_Admin_Guide_v2.3.pdf-manuel
Apple-macbook_pro-13-inch-late-2012-quick_start.pdf-manuel
Apple-CocoaDrawingGuide.pdf-manuel
Apple-Cryptographic-Services-Guide-manuel
Apple-Resource-Programming-Guide-manuel
AppleSafariVisualEffectsProgGuide.pdf-manuel
/Apple-WorkingWithUSB.pdf-manuel
Apple-macbook_pro-retina-mid-2012-important_product_info_f.pdf-manuel
Apple-iOS_Security_May12.pdf-manue
Apple-Mac-Pro-2008-Performance-and-Productivity-for-Creative-Pros
Apple-iPod_shuffle_4thgen_Manuale_utente.pdf-Italie-Manuel
Apple-KernelProgramming.pdf-manuel
Apple-Core-Data-Model-Versioning-and-Data-Migration-Programming-Guide-manuel
Apple-RED_Workflows_with_Final_Cut_Pro_X.pdf-manuel
Apple-Transitioning-to-ARC-Release-Notes-manuel
Apple-iTunes-Connect-Sales-and-Trends-Guide-manuel
Apple-App-Sandbox-Design-Guide-manuel
Apple-String-Programming-Guide-manuel
Apple-Secure-Coding-Guide-manuel
Apple_AirPort_Networks_Early2009.pdf-manuel
Apple-TimeCapsule_SetupGuide_TA.pdf-manuel
Apple-time_capsule_4th_gen_setup.pdf-manuel
Apple-TimeCapsule_SetupGuide.pdf-manuel
Apple-TimeCapsule_SetupGuide_CH.pdf-Chinois-manuel
Apple-CodeSigningGuide.pdf-manuel
Apple-ViewControllerPGforiOS.pdf-manuel
Apple-KeyValueObserving.pdf-manuel
Apple-mac_mini-late-2012-quick_start.pdf-manuel
Apple-OS-X-Mountain-Lion-Core-Technologies-Overview-June-2012-manuel
Apple-OS-X-Server-Product-Overview-June-2012-manuel
Apple-Apple_Server_Diagnostics_UG_109.pdf-manuel
Apple-PackageMaker_UserGuide.pdf-manuel
Apple-Instrumentos_y_efectos_de_Logic_Studio.pdf-Manuel
Apple-ipod_nano_kayttoopas.pdf-Finlande-Manuel
Apple_ProRes_White_Paper_October_2012.pdf-Manuel
Apple-wp_osx_configuration_profiles.pdf-Manuel
Apple-UsingiTunesProducerFreeBooks.pdf-Manuel
Apple-ipad_manual_do_usuario.pdf-Portugais-Manuel
Apple-Instruments_et_effets_Logic_Studio.pdf-Manuel
Apple-ipod_touch_gebruikershandleiding.pdf-Neerlandais-Manuel
AppleiPod_shuffle_4thgen_Manual_del_usuario.pdf-Espagnol-Manuel
Apple-Premiers-contacts-avec-votre-PowerBook-G4-Manuel
Apple_Composite_AV_Cable.pdf-Manuel
Apple-iPod_shuffle_3rdGen_UG_DK.pdf-Danemark-Manuel
Apple-iPod_classic_160GB_Benutzerhandbuch.pdf-Allemand-Manuel
Apple-VoiceOver_GettingStarted-Manuel
Apple-iPod_touch_2.2_Benutzerhandbuch.pdf-Allemand-Manuel
Apple-Apple_TV_Opstillingsvejledning.pdf-Allemand-Manuel
Apple-iPod_shuffle_4thgen_Manuale_utente.pdf-Italie-Manuel
Apple-iphone_prirucka_uzivatela.pdf-Manuel
Apple-Aan-de-slag-Neerlandais-Manuel
Apple-airmac_express-80211n-2nd-gen_setup_guide.pdf-Thailande-Manuel
Apple-ipod_nano_benutzerhandbuch.pdf-Allemand-Manuel
Apple-aperture3.4_101.pdf-Manuel
Apple-Pages09_Anvandarhandbok.pdf-Manuel
Apple-nike_plus_ipod_sensor_ug_la.pdf-Mexique-Manuel
Apple-ResEdit-Reference-For-ResEdit02.1-Manuel
Apple-ipad_guide_de_l_utilisateur.pdf-Manuel
Apple-Compressor-4-Benutzerhandbuch-Allemand-Manuel
Apple-AirPort_Networks_Early2009_DK.pdf-Danemark-Manuel
Apple-MacBook_Pro_Mid2007_2.4_2.2GHz_F.pdf-Manuel
Apple-MacBook_13inch_Mid2010_UG_F.pdf-Manuel
Apple-Xserve-RAID-Presentation-technologique-Janvier-2004-Manuel
Apple-MacBook_Pro_15inch_Mid2010_F.pdf-Manuel
Apple-AirPort_Express-opstillingsvejledning.pdf-Danemark-Manuel
Apple-DEiPod_photo_Benutzerhandbuch_DE0190269.pdf-Allemand-Manuel
Apple-Final-Cut-Pro-X-Logic-Effects-Reference-Manuel
Apple-iPod_touch_2.1_Brugerhandbog.pdf-Danemark-Manuel
Apple-Remote-Desktop-Administratorhandbuch-Version-3.1-Allemand-Manuel
Apple-Qmaster-4-User-Manual-Manuel
Apple-Server_Administration_v10.5.pdf-Manuel
Apple-ipod_classic_features_guide.pdf-Manuel
Apple-iPhone_Finger_Tips_Guide.pdf-Anglais-Manuel
Apple-Boitier-de-l-ordinateur-Manuel
Apple-Guide_de_configuration_de_l_Airport_Express_5.1.pdf-Manuel
Apple-iMac_Mid2010_UG_F.pdf-Manuel
Apple-MacBook_13inch_Mid2009_F.pdf-Manuel
Apple-MacBook_Mid2007_UserGuide.F.pdf-Manuel
Apple-Designing_AirPort_Networks_10.5-Windows_F.pdf-Manuel
Apple-Administration_de_QuickTime_Streaming_et_Broadcasting_10.5.pdf-Manuel
Apple-Opstillingsvejledning_til_TimeCapsule.pdf-Danemark-Manuel
Apple-iPod_nano_5th_gen_Benutzerhandbuch.pdf-Manuel
Apple-AirPort_Extreme_Installationshandbuch.pdf-Manuel
Apple-Final_Cut_Express_4_Installation_de_votre_logiciel.pdf-Manuel
Apple-MacBook_Pro_15inch_2.53GHz_Mid2009.pdf-Manuel
Apple-Network_Services.pdf-Manuel
Apple-Aperture_Performing_Adjustments_f.pdf-Manuel
Apple-Supplement_au_guide_Premiers_contacts.pdf-Manuel
Apple-Administration_des_images_systeme_et_de_la_mise_a_jour_de_logiciels_10.5.pdf-Manuel
Apple-Mac_OSX_Server_v10.6_Premiers_contacts.pdf-Francais-Manuel
Apple-Designing_AirPort_Networks_10.5-Windows_F.pdf-Manuel
Apple-Mise_a_niveau_et_migration_v10.5.pdf-Manue
Apple-MacBookPro_Late_2007_2.4_2.2GHz_F.pdf-Manuel
Apple-Mac_mini_Late2009_SL_Server_F.pdf-Manuel
Apple-Mac_OS_X_Server_10.5_Premiers_contacts.pdf-Manuel
Apple-iPod_touch_2.0_Guide_de_l_utilisateur_CA.pdf-Manuel
Apple-MacBook_Pro_17inch_Mid2010_F.pdf-Manuel
Apple-Comment_demarrer_Leopard.pdf-Manuel
Apple-iPod_2ndGen_USB_Power_Adapter-FR.pdf-Manuel
Apple-Feuille_de_operations_10.4.pdf-Manuel
Apple-Time_Capsule_Installationshandbuch.pdf-Allemand-Manuel
Apple-F034-2262AXerve-grappe.pdf-Manuel
Apple-Mac_Pro_Early2009_4707_UG_F
Apple-imacg5_17inch_Power_Supply
Apple-Logic_Studio_Installieren_Ihrer_Software_Retail
Apple-Aperture_Getting_Started_d.pdf-Allemand
Apple-getting_started_with_passbook
Apple-iPod_mini_2nd_Gen_UserGuide.pdf-Anglais
Apple-Deploiement-d-iPhone-et-d-iPad-Reseaux-prives-virtuels
Apple-Mac_OS_X_Server_Glossaire_10.5
Apple-iphone_bluetooth_headset_userguide
Apple-Administration_des_services_reseau_10.5
Apple-iPod_nano_4th_gen_Manuale_utente
Apple-iBook-G4-Getting-Started
Apple-Guide_des_fonctionnalites_de_l_iPod_classic
Apple-Guide_de_configuration_d_Xsan_2
Apple-MacBook_Late2006_UsersGuide
Apple-Mac_mini_Mid2010_User_Guide_F.pdf-Francais
Apple-PowerBookG3UserManual.PDF.Anglais
Apple-Installation_de_votre_logiciel_Logic_Studio_Retail
Apple-Pages-Guide-de-l-utilisateur
Apple-MacBook_Pro_13inch_Mid2009.pdf.Anglais
Apple-MacBook_Pro_15inch_Mid2009
Apple-Installation_de_votre_logiciel_Logic_Studio_Upgrade
Apple-airportextreme_802.11n_userguide
Apple-iPod_classic_160GB_User_Guide
Apple-iPod_nano_5th_gen_UserGuide
Apple-ipod_touch_features_guide
Apple-Wireless_Mighty_Mouse_UG
Apple-Advanced-Memory-Management-Programming-Guide
Apple-iOS-App-Programming-Guide
Apple-Concurrency-Programming-Guide
Apple-MainStage-2-User-Manual-Anglais
Apple-iMacG3_2002MultilingualUserGuide
Apple-iBookG3_DualUSBUserGuideMultilingual.PDF.Anglais
Apple-Guide_de_l_utilisateur_de_Mac_Pro_Early_2008
Apple-Installation_de_votre_logiciel_Logic_Express_8
Apple-iMac_Guide_de_l_utilisateur_Mid2007
Apple-imacg5_20inch_OpticalDrive
Apple-FCP6_Formats_de_diffusion_et_formats_HD
Apple-prise_en_charge_des_surfaces_de_controle_logic_pro_8
Apple-Aperture_Quick_Reference_f
Apple-aluminumAppleKeyboard_wireless2007_UserGuide
Apple-ipod_shuffle_features_guide
ApplePowerMacG5_(Early_2005)_UserGuide
Apple-MacBook_Pro_Early_2008_Guide_de_l_utilisateur
Apple-Nouvelles-fonctionnalites-aperture-1.5
Apple-premiers_contacts_2e_ed_10.4.pdf-Mac-OS-X-Server
Apple-premiers_contacts_2e_ed_10.4
Apple-Keynote2_UserGuide.pdf-Japon
Apple-Welcome_to_Tiger.pdf-Japon
Apple-XsanAdminGuide_j.pdf-Japon
Apple-PowerBookG4_UG_15GE.PDF-Japon
Apple-Xsan_Migration.pdf-Japon
Apple-Xserve_Intel_DIY_TopCover_JA.pdf-Japon
Apple-iPod_nano_6thgen_User_Guide_J.pdf-Japon
Apple-Aperture_Photography_Fundamentals.pdf-Japon
Apple-nikeipod_users_guide.pdf-Japon
Apple-QuickTime71_UsersGuide.pdf-Japon
Apple-iMacG5_iSight_UG.pdf-Japon
Apple-Aperture_Performing_Adjustments_j.pdf-Japon
Apple-iMacG5_17inch_HardDrive.pdf-Japon
Apple-iPod_shuffle_Features_Guide_J.pdf-Japon
Apple-MacBook_Air_User_Guide.pdf-Japon
Apple-MacBook_UsersGuide.pdf-Japon
Apple-iPad_iOS4_Brukerhandbok.pdf-Norge-Norvege
Apple-Apple_AirPort_Networks_Early2009_H.pd-Norge-Norvege
Apple-iPod_classic_120GB_no.pdf-Norge-Norvege
Apple-Xserve_Intel_DIY_ExpansionCardRiser_JA.pdf-Japon
Apple-iMacG5_Battery.pdf-Japon
Apple-Logic_Pro_8_Getting_Started.pdf-Japon
Apple-PowerBook-handbok-Norge-Norveg
Apple-iWork09_formler_og_funksjoner.pdf-Norge-Norvege
Apple-MacBook_Pro_15inch_Mid2010_H.pdf-Norge-Norvege
Apple-MacPro_HardDrive_DIY.pdf-Japon
Apple-iPod_Fifth_Gen_Funksjonsoversikt.pdf-Norge-Norvege
Apple-MacBook_13inch_white_Early2009_H.pdf-Norge-Norvege
Apple-GarageBand_09_Komme_i_gang.pdf-Norge-Norvege
Apple-MacBook_Pro_15inch_Mid2009_H.pdf-Norge-Norvege
Apple-imac_mid2011_ug_h.pdf-Norge-Norvege
Apple-iDVD_08_Komme_i_gang.pdf-Norge-Norvege
Apple-MacBook_Air_11inch_Late2010_UG_H.pdf-Norge-Norvege
Apple-iMac_Mid2010_UG_H.pdf-Norge-Norvege
Apple-MacBook_13inch_Mid2009_H.pdf-Norge-Norvege
/Apple-iPhone_3G_Viktig_produktinformasjon_H-Norge-Norvege
Apple-MacBook_13inch_Mid2010_UG_H.pdf-Norge-Norvege
Apple-macbook_air_13inch_mid2011_ug_no.pdf-Norge-Norvege
Apple-Mac_mini_Early2009_UG_H.pdf-Norge-Norvege
Apple-ipad2_brukerhandbok.pdf-Norge-Norvege
Apple-iPhoto_08_Komme_i_gang.pdf-Norge-Norvege
Apple-MacBook_Air_Brukerhandbok_Late2008.pdf-Norge-Norvege
Apple-Pages09_Brukerhandbok.pdf-Norge-Norvege
Apple-MacBook_13inch_Late2009_UG_H.pdf-Norge-Norvege
Apple-iPhone_3GS_Viktig_produktinformasjon.pdf-Norge-Norvege
Apple-MacBook_13inch_Aluminum_Late2008_H.pdf-Norge-Norvege
Apple-Wireless_Keyboard_Aluminum_2007_H-Norge-Norvege
Apple-NiPod_photo_Brukerhandbok_N0190269.pdf-Norge-Norvege
Apple-MacBook_Pro_13inch_Mid2010_H.pdf-Norge-Norvege
Apple-MacBook_Pro_17inch_Mid2010_H.pdf-Norge-Norvege
Apple-Velkommen_til_Snow_Leopard.pdf-Norge-Norvege.htm
Apple-TimeCapsule_Klargjoringsoversikt.pdf-Norge-Norvege
Apple-iPhone_3GS_Hurtigstart.pdf-Norge-Norvege
Apple-Snow_Leopard_Installeringsinstruksjoner.pdf-Norge-Norvege
Apple-iMacG5_iSight_UG.pdf-Norge-Norvege
Apple-iPod_Handbok_S0342141.pdf-Norge-Norvege
Apple-ipad_brukerhandbok.pdf-Norge-Norvege
Apple-GE_Money_Bank_Handlekonto.pdf-Norge-Norvege
Apple-MacBook_Air_11inch_Late2010_UG_H.pdf-Norge-Norvege
Apple-iPod_nano_6thgen_Brukerhandbok.pdf-Norge-Norvege
Apple-iPod_touch_iOS4_Brukerhandbok.pdf-Norge-Norvege
Apple-MacBook_Air_13inch_Late2010_UG_H.pdf-Norge-Norvege
Apple-MacBook_Pro_15inch_Early2011_H.pdf-Norge-Norvege
Apple-Numbers09_Brukerhandbok.pdf-Norge-Norvege
Apple-Welcome_to_Leopard.pdf-Japon
Apple-PowerMacG5_UserGuide.pdf-Norge-Norvege
Apple-iPod_touch_2.1_Brukerhandbok.pdf-Norge-Norvege
Apple-Boot_Camp_Installering-klargjoring.pdf-Norge-Norvege
Apple-MacOSX10.3_Welcome.pdf-Norge-Norvege
Apple-iPod_shuffle_3rdGen_UG_H.pdf-Norge-Norvege
Apple-iPhone_4_Viktig_produktinformasjon.pdf-Norge-Norvege
Apple_TV_Klargjoringsoversikt.pdf-Norge-Norvege
Apple-iMovie_08_Komme_i_gang.pdf-Norge-Norvege
Apple-iPod_classic_160GB_Brukerhandbok.pdf-Norge-Norvege
Apple-Boot_Camp_Installering_10.6.pdf-Norge-Norvege
Apple-Network-Services-Location-Manager-Veiledning-for-nettverksadministratorer-Norge-Norvege
Apple-iOS_Business_Mar12_FR.pdf
Apple-PCIDualAttachedFDDICard.pdf
Apple-Aperture_Installing_Your_Software_f.pdf
Apple-User_Management_Admin_v10.4.pdf
Apple-Compressor-4-ユーザーズマニュアル Japon
Apple-Network_Services_v10.4.pdf
Apple-iPod_2ndGen_USB_Power_Adapter-DE
Apple-AirPort_Express_Opstillingsvejledning_5.1.pdf
Apple-MagSafe_Airline_Adapter.pdf
Apple-L-Apple-Multiple-Scan-20-Display
Apple-Administration_du_service_de_messagerie_10.5.pdf
Apple-iMac_Intel-based_Late2006.pdf-Japon
Apple-iPhone_3GS_Finger_Tips_J.pdf-Japon
Apple-Power-Mac-G4-Mirrored-Drive-Doors-Japon
Apple-atadrive_pmg4mdd.j.pdf-Japon
Apple-iPod_touch_2.2_User_Guide_J.pdf-Japon
Apple-Mac_OS_X_Server_v10.2.pdf
Apple-AppleCare_Protection_Plan_for_Apple_TV.pdf
Apple-DVD_Studio_Pro_4_Installation_de_votre_logiciel
Apple-PowerBookG4_17inch1.67GHzUG
Apple-iMac_Intel-based_Late2006
Apple-Installation_de_votre_logiciel
Apple-guide_des_fonctions_de_l_iPod_nano
Apple-Administration_de_serveur_v10.5
Apple-Mac-OS-X-Server-Premiers-contacts-Pour-la-version-10.3-ou-ulterieure
Apple-iBookG3_14inchUserGuideMultilingual
Apple-mac_pro_server_mid2010_ug_f
Apple-Motion_Supplemental_Documentation
Apple-iphone_guide_de_l_utilisateur
Apple-macbook_air_11inch_mid2011_ug_fr
Apple-NouvellesfonctionnalitesdeLogicExpress7.2
Apple-Mac_Pro_Early2009_4707_UG
Apple-guide_de_l_utilisateur_de_Numbers08
Apple-Guide_de_configuration_et_d'administration
Apple-mac_integration_basics_fr_106.
Apple-iPod_shuffle_4thgen_Guide_de_l_utilisateur
Apple-081811_APP_iPhone_Japanese_v5.4.pdf-Japan
Apple-Recycle_Contract120919.pdf-Japan
Apple-World_Travel_Adapter_Kit_UG
Apple-iPod_nano_6thgen_User_Guide
Apple-Mac_mini_Early2009_UG_F.pdf-Manuel-de-l-utilisateur
Apple-Compressor_3_Batch_Monitor_User_Manual_F.pdf-Manuel-de-l-utilisateur
Apple-Premiers__contacts_avec_iDVD_08
Apple-Mac_mini_Intel_User_Guide.pdf
Apple-Prise_en_charge_des_surfaces_de_controle_Logic_Express_8
Apple-mac_integration_basics_fr_107.pdf
Apple-Final-Cut-Pro-7-Niveau-1-Guide-de-preparation-a-l-examen
Apple-Logic9-examen-prep-fr.pdf-Logic-Pro-9-Niveau-1-Guide-de-preparation-a-l-examen
Apple-aperture_photography_fundamentals.pdf-Manuel-de-l-utilisateu
Apple-emac-memory.pdf-Manuel-de-l-utilisateur
Apple-Apple-Installation-et-configuration-de-votre-Power-Mac-G4
Apple-Guide_de_l_administrateur_d_Xsan_2.pdf
Apple-premiers_contacts_avec_imovie6.pdf
Apple-Tiger_Guide_Installation_et_de_configuration.pdf
Apple-Final-Cut-Pro-7-Level-One-Exam-Preparation-Guide-and-Practice-Exam
Apple-ard_admin_guide_2.2_fr.pdf
Apple-systemoverviewj.pdf-Japon
Apple-Xserve_TO_J070411.pdf-Japon
Apple-premiers_contacts_avec_iwork_08.pdf
Apple-services_de_collaboration_2e_ed_10.4.pdf
Apple-iPhone_Bluetooth_Headset_Benutzerhandbuch.pdf
Apple-Guide_de_l_utilisateur_de_Keynote08.pdf
APPLE/Apple-Logic-Pro-9-Effectsrfr.pdf
Apple-Logic-Pro-9-Effectsrfr.pdf
Apple-iPod_shuffle_3rdGen_UG_F.pdf
Apple-iPod_classic_160Go_Guide_de_l_utilisateur.pdf
Apple-iBookG4GettingStarted.pdf
Apple-Administration_de_technologies_web_10.5.pdf
Apple-Compressor-4-User-Manual-fr
Apple-MainStage-User-Manual-fr.pdf
Apple-PowerBookG4_15inch1.67-1.5GHzUserGuide.pdf
Apple-MacBook_Pro_15inch_Mid2010_CH.pdf
Apple-LED_Cinema_Display_27-inch_UG.pdf
Apple-MacBook_Pro_15inch_Mid2009_RS.pdf
Apple-macbook_pro_13inch_early2011_f.pdf
Apple-iphone_user_guide-For-iOS-6-Software
Apple-iDVD5_Getting_Started.pdf
Apple-guide_des_fonctionnalites_de_l_ipod_touch.pdf
Apple_macbook_pro_13inch_early2011_f
Apple_Guide_de_l_utilisateur_d_Utilitaire_RAID
Apple_Time_Capsule_Early2009_Setup_F
Apple_iphone_4s_finger_tips_guide_rs
apple_iphone_gebruikershandleiding
apple_apple_tv_3rd_gen_setup_tw
apple_macbook_pro-retina-mid-2012-important_product_info_ch
apple_Macintosh-User-s-Guide-for-Macintosh-PowerBook-145
Apple_ipod_touch_user_guide_ta
Apple_TV_2nd_gen_Setup_Guide_h
Apple_ipod_touch_manual_del_usuario
Apple_iphone_4s_finger_tips_guide_tu
Apple_macbook_pro_retina_qs_th
Apple-Manuel_de_l'utilisateur_de_Final_Cut_Server
Apple-Cinema_Tools_4.0_User_Manual_F
Apple-Personal-LaserWriter300-User-s-Guide
Apple-QuickTake-100-User-s-Guide-for-Macintosh
Apple-User-s-Guide-Macintosh-LC-630-DOS-Compatible
Apple-iPhone_iOS3.1_User_Guide
Apple-iphone_4s_important_product_information_guide
Apple-iPod_shuffle_Features_Guide_F
Apple-Premiers_contacts_avec_iMovie_08
Apple-macbook_pro-retina-mid-2012-important_product_info_br
Apple-macbook_pro-13-inch-mid-2012-important_product_info
Apple-macbook_air-11-inch_mid-2012-qs_br
Apple-Manuel_de_l_utilisateur_de_MainStage
Apple-Compressor_3_User_Manual_F
Apple-guide_de_configuration_airport_express_4.2
Apple-Instruments_et_effets_Logic_Express_8
Apple-Manuel_de_l_utilisateur_de_WaveBurner
Apple-Macmini_Guide_de_l'utilisateur
Disque dur, ATA parallèle Instructions de remplacement
Apple-final_cut_pro_x_logic_effects_ref_f
Apple-Leopard_Installationshandbok
Apple-thunderbolt_display_getting_started_1e
Apple-Compressor-4-Benutzerhandbuch
Apple-macbook_air_11inch_mid2011_ug
Apple-macbook_air-mid-2012-important_product_info_j
Apple-iPod-nano-Guide-des-fonctionnalites
Apple-iPod-nano-Guide-des-fonctionnalites
Apple-iPod-nano-Guide-de-l-utilisateur-4eme-generation
Apple-iPod-nano-Guide-de-l-utilisateur-4eme-generation
Apple-Manuel_de_l_utilisateur_d_Utilitaire_de_reponse_d_impulsion
Apple-Aperture_2_Raccourcis_clavier
Apple-livetype_2_user_manual_f
Apple-macbook_air_guide_de_l_utilisateur
Apple-MacBook_Early_2008_Guide_de_l_utilisateur
Apple-Keynote-2-Guide-de-l-utilisateur
Apple-PowerBook-User-s-Guide-for-PowerBook-computers
Apple-Macintosh-Performa-User-s-Guide-5200CD-and-5300CD
Apple-Macintosh-Performa-User-s-Guide
Apple-iPod-nano-Guide-des-fonctionnalites
Apple-iPad-User-Guide-For-iOS-5-1-Software
Apple-Boot-Camp-Guide-d-installation-et-de-configuration
Apple-iPod-nano-Guide-de-l-utilisateur-4eme-generation
Power Mac G5 Guide de l’utilisateur APPLE
Guide de l'utilisateur PAGE '08 APPLE
Guide de l'utilisateur KEYNOTE '09 APPLE
Guide de l'Utilisateur KEYNOTE '3 APPLE
Guide de l'Utilisateur UTILITAIRE RAID
Guide de l'Utilisateur Logic Studio
Power Mac G5 Guide de l’utilisateur APPLE
Guide de l'utilisateur PAGE '08 APPLE
Guide de l'utilisateur KEYNOTE '09 APPLE
Guide de l'Utilisateur KEYNOTE '3 APPLE
Guide de l'Utilisateur UTILITAIRE RAID
Guide de l'Utilisateur Logic Studio
Guide de l’utilisateur ipad Pour le logiciel iOS 5.1
PowerBook G4 Premiers Contacts APPLE
Guide de l'Utilisateur iphone pour le logiciel ios 5.1 APPLE
Guide de l’utilisateur ipad Pour le logiciel iOS 4,3
Guide de l’utilisateur iPod nano 5ème génération
Guide de l'utilisateur iPod Touch 2.2 APPLE
Guide de l’utilisateur QuickTime 7 Mac OS X 10.3.9 et ultérieur Windows XP et Windows 2000
Guide de l'utilisateur MacBook 13 pouces Mi 2010
Guide de l’utilisateur iPhone (Pour les logiciels iOS 4.2 et 4.3)
Guide-de-l-utilisateur-iPod-touch-pour-le-logiciel-ios-4-3-APPLE
Guide-de-l-utilisateur-iPad-2-pour-le-logiciel-ios-4-3-APPLE
Guide de déploiement en entreprise iPhone OS
Guide-de-l-administrateur-Apple-Remote-Desktop-3-1
Guide-de-l-utilisateur-Apple-Xserve-Diagnostics-Version-3X103
Guide-de-configuration-AirPort-Extreme-802.11n-5e-Generation
Guide-de-configuration-AirPort-Extreme-802-11n-5e-Generation
Guide-de-l-utilisateur-Capteur-Nike-iPod
Guide-de-l-utilisateur-iMac-21-5-pouces-et-27-pouces-mi-2011-APPLE
Guide-de-l-utilisateur-Apple-Qadministrator-4
Guide-d-installation-Apple-TV-3-eme-generation
User-Guide-iPad-For-ios-5-1-Software
QuickTime 7.3
User’s Guide
Includes instructions for
using QuickTime Pro
For Mac OS X version 10.3.9 or later, and WindowsK Apple Inc.
© 2007 Apple Inc. All rights reserved.
Under the copyright laws, this manual may not be
copied, in whole or in part, without the written consent
of Apple. Your rights to the software are governed by
the accompanying software license agreement.
The Apple logo is a trademark of Apple Inc., registered
in the U.S. and other countries. Use of the “keyboard”
Apple logo (Option-Shift-K) for commercial purposes
without the prior written consent of Apple may
constitute trademark infringement and unfair
competition in violation of federal and state laws.
Every effort has been made to ensure that the
information in this manual is accurate. Apple is not
responsible for printing or clerical errors.
Apple
1 Infinite Loop
Cupertino, CA 95014-2084
408-996-1010
www.apple.com
Apple, the Apple logo, AppleScript, Final Cut Pro,
FireWire, iMovie, iPod, iTunes, Mac, Mac OS, Macintosh,
QuickDraw, and QuickTime are trademarks of Apple Inc.,
registered in the U.S. and other countries. Finder,
iPhone, and Tiger are trademarks of Apple Inc. Apple
Store is a service mark of Apple Inc., registered in the
U.S. and other countries. .Mac is a service mark of Apple
Inc.
Intel, Intel Core, and Xeon are trademarks of Intel Corp.
in the U.S. and other countries.
PowerPC™ is a trademark of International Business
Machines Corporation, used under license therefrom.
Other company and product names mentioned herein
are trademarks of their respective companies. Mention
of third-party products is for informational purposes
only and constitutes neither an endorsement nor a
recommendation. Apple assumes no responsibility with
regard to the performance or use of these products.
Manufactured under license from Dolby Laboratories.
“Dolby,” “Pro Logic,” and the double-D symbol are
trademarks of Dolby Laboratories. Confidential
UnPublished Works, © 1992–1997 Dolby Laboratories,
Inc. All rights reserved.
Simultaneously published in the United States and
Canada. 019-1032/2007-09-01 3
3 Contents
Preface 6 Welcome to QuickTime
6 What Is QuickTime?
6 What Is QuickTime Pro?
7 What’s New in QuickTime 7?
7 New in QuickTime Player
8 New in QuickTime Pro
9 System Requirements
9 Types of Files QuickTime Supports
10 Checking for New Versions of QuickTime
10 Using Onscreen Help
10 Where to Go for Additional Information
Chapter 1 11 Using QuickTime Player
11 Opening and Playing Files
11 Opening and Playing Movies in QuickTime Player
12 Opening and Playing Files in a Web Browser
15 Viewing QuickTime Virtual Reality (QTVR) Movies
16 Viewing Still Images
16 Playing MIDI Files
17 Opening Recently Used Files
17 Finding Movies Quickly Using QuickTime Favorites
17 Playing Copy-Protected Movies
18 Viewing Information About a File
18 Controlling Playback
18 Adjusting Audio and Video Settings
18 Changing Playback Preferences
19 Viewing Movies at Full Screen
20 Changing Movie Size for Playback
20 Looping a Movie
20 Simultaneously Playing Multiple Movies
21 Using Frame Number and Time Codes
21 Navigating a Movie by Frame Number or Time Code
22 Finding Text in a Text Track4 Contents
22 Preventing Users from Changing QuickTime Settings
22 Viewing Movies that have Flash Content
Chapter 2 23 Getting Started with QuickTime Pro
23 Getting QuickTime Pro
23 Using Advanced Playback Options
23 Playing a Movie on a Second Display
24 Presenting a Movie as a Slideshow
24 Changing the Color Around a Movie
25 Loading Movies into RAM for Better Playback
25 Creating Movies and Other Media
25 Recording Video and Audio
26 About Saving Movies
27 Saving Movies from the Internet
27 Creating a Slideshow or Animation from Still Images
28 Creating a Still Image from a Movie
28 Converting Files into QuickTime Movies
29 Sharing Movies by Email or the Web
29 Sharing Movies for Podcast Producer
Chapter 3 30 Editing and Authoring with QuickTime Pro
30 Simple Editing
30 Selecting and Playing Part of a Movie
31 Cutting, Copying, or Deleting a Section of a Movie
31 Combining Two QuickTime Movies into One
32 Working with Tracks
32 Turning Tracks On or Off
32 Extracting, Adding, and Moving Tracks
33 Working with Audio Tracks
34 Presenting Multiple Movies in the Same Window
35 Pasting Graphics and Text into a Movie
35 Working with Text Tracks
37 Specifying Languages for Individual Tracks
38 Changing Movie Properties
38 Adding Annotations to a Movie
38 Resizing, Flipping, or Rotating a Movie
39 Changing a Movie’s Shape with a Video Mask
39 Changing a Track’s Transparency
39 Creating a Chapter List for a Movie
41 Setting a Movie’s Poster Frame
41 Saving a Movie with Specific Playback Settings
41 Changing the Movie Controller TypeContents 5
Chapter 4 42 Exporting Files with QuickTime Pro
42 About Video and Audio Compression
43 Exporting Files Using Presets
43 Customizing Export Settings
43 Customizing Video Export Settings
45 Adding Special Effects and Filters to a QuickTime Movie
45 Changing Image (Frame) Size
46 Customizing Sound Export Settings
46 Preparing Movies for Internet Delivery
47 Preparing a Movie for Fast Start
47 Preparing a Movie for Real-Time Streaming
48 Creating Reference Movies to Optimize Web Playback
48 Creating Movies Optimized for iPhone and Web Delivery
49 Exporting MPEG-4 Files
49 MPEG-4 Video Export Options
50 MPEG-4 Audio Export Options
51 MPEG-4 Streaming Export Options
51 Exporting 3G Files
52 3G File Format Export Options
52 3G Video Export Options
53 3G Audio Export Options
54 3G Text Options
54 3G Streaming Options
54 3G Advanced Options
Appendix 55 Shortcuts and Tips
55 QuickTime Player Keyboard Shortcuts
56 QuickTime Pro Keyboard Shortcuts
57 Automating QuickTime Player with AppleScript
58 Automating QuickTime Player on Windows
Glossary 59
Index 62Preface
6
Welcome to QuickTime
Want to play movies from your hard disk or the Internet?
QuickTime Player makes it easy.
What Is QuickTime?
QuickTime Player is a free multimedia player. You can use it to view many kinds of files,
including video, audio, still images, graphics, and virtual reality (VR) movies. QuickTime
supports the most popular formats on the Internet for news, sports, education, movie
trailers, and other entertainment.
QuickTime is also a multimedia architecture that other applications can leverage. Some
of the most popular software—such as iTunes, iMovie, and Final Cut Pro from Apple, as
well as many third-party programs—uses the QuickTime architecture for important
multimedia functions. These applications require QuickTime to be installed in order to
function properly.
What Is QuickTime Pro?
You can easily add a host of useful features to your QuickTime software by purchasing
QuickTime Pro. With QuickTime Pro, you can:
 Save files from the Internet
 Edit audio and video
 Record audio (Mac OS X and Windows) and video (Mac OS X only)
 Add special effects
 Create slideshows
 Convert and save video, audio, and images to more than a hundred standard formats
For information about how to start using QuickTime Pro, see “Getting QuickTime Pro”
on page 23.Preface Welcome to QuickTime 7
What’s New in QuickTime 7?
Both the free QuickTime Player and QuickTime Pro provide a host of new features.
New in QuickTime Player
 H.264 video support. This state-of-the-art, standards-based codec delivers
exceptional-quality video at the lowest data rate possible, across data rates ranging
from 3G to HD and beyond.
 Live resize. Playback continues smoothly as you change the size of the QuickTime
Player window. (Some hardware requirements may apply.)
 Zero-configuration streaming. You no longer need to set your Internet connection
speed in QuickTime Preferences. QuickTime automatically determines the best
connection speed for your computer. If a connection is lost during streaming,
QuickTime automatically reconnects to the server.
 Surround sound. QuickTime Player can now play up to 24 channels of audio. With
QuickTime 7, your Mac, and surround speakers, you can enjoy the full effect of your
surround sound movie or game.
 New and improved playback controls. Use the new A/V Controls window to adjust
settings for the best viewing experience. Easily change settings including jog shuttle,
playback speed, bass, treble, and balance.
 All-new content guide. The all-new QuickTime Content Guide provides the latest in
entertainment on the Internet.
 Full-screen playback. Get the most out of your display by using every pixel possible.
Thee new modes allow you fit the content to any size screen.
 Floating controls. Full-screen mode now provides floating DVD-like controls for easy
access to functions like pause, play, fast-forward, rewind, and full-screen options.
Move your mouse and the full-screen controller appears on the screen for several
seconds.
 Additional keyboard shortcuts. QuickTime Player now supports the same transport
control keyboard shortcuts as Final Cut Pro. While viewing a movie, press J, K, or L to
rewind, pause, or resume playback at variable speeds.
 Closed Captioning. An option in QuickTime Player Preferences allows you to display
standard CEA-608 closed captions, when they’re available in your movies.
 Timecode Display. QuickTime Player now allows you to switch between displaying
movie time, timecode, and frame count. You can also jump to a specific timecode or
frame number using the keyboard.
 Spotlight-friendly media. With Mac OS X v10.4 or later, you can use Spotlight to
easily find your QuickTime content. Spotlight can search for movie attributes such as
artist, copyright, codec, and so on.
 Screen reader compatibility. Using VoiceOver, included with Mac OS X v10.4 or later,
visually impaired users can enjoy QuickTime Player features.8 Preface Welcome to QuickTime
 Easy access to QuickTime Pro. When you use the free QuickTime Player, features
available only in QuickTime Pro display “Pro” by their name. If you choose one of
these items, you’ll see a definition of the feature and learn how to purchase
QuickTime Pro. (To purchase QuickTime Pro, you must be connected to the Internet
using the computer on which you want to install the software.)
New in QuickTime Pro
QuickTime 7 Pro users enjoy not only all the great features in QuickTime Player, but also
the following new QuickTime Pro capabilities:
 Create H.264 video. Use this codec for all your video encoding needs. Create
content ranging in size from HD (high definition) to 3G (for mobile devices), and
everything in between.
 Create surround audio. Create a rich multimedia experience for your customers by
adding multi-channel audio to your movie. If some of your customers don’t have
surround speakers, don’t worry; QuickTime automatically mixes the audio to work
with the speaker setup of each user.
 Improved movie authoring. Editing tasks are much easier with new hot keys for in
and out points. In addition, the Movie Properties interface has been completely
redesigned to facilitate simple and efficient movie authoring.
 New AAC constant-quality mode. Create AAC audio files optimized for constant
quality rather than a constant bit rate for a consistently high-quality listening
experience.
 3G streaming. Create 3G files for RTSP streaming that are fully interoperable with
other 3G streaming handsets and delivery architectures.
 Conform to Aperture. View a movie’s aperture mode, and choose to have the movie
conform to new aperture settings, including pixel shape.
 Deinterlace source video. When exporting with the “Movie to QuickTime Movie”
option, you can now deinterlace the video by setting an option in Export Size
settings.
 Export to Apple TV, iPod, and iPhone. New presets allow you to easily export your
movies in formats optimized for use with Apple TV, iPod, and iPhone.
 Export for Web. Automatically creates versions of a movie that are optimized for
both web and iPhone delivery, a reference movie that automatically selects the
appropriate version for playback, and an HTML snippet file that you can use to
embed the movie on a web page.
 Concurrent exports. Export multiple files simultaneously—and continue with your
next playback or editing task.
New for Mac OS X
In addition to the capabilities above, QuickTime Pro for Mac OS X provides these
capabilities:
 Video recording. With a digital video camera connected to your Mac, you can
quickly create video postcards to share with family and friends.Preface Welcome to QuickTime 9
 Movie sharing. Easily create a movie file for sending via email or posting to a
website.
 Automator integration. With Mac OS X v10.4 Tiger or later, employ the easy-to-use
interface of Automator for streamlining your QuickTime workflow. QuickTime 7 Pro
users have exclusive access to a set of QuickTime-based Automator actions for easily
automating such tasks as starting and stopping captures, hinting movies, enabling
tracks, and more. With Automator and QuickTime 7 Pro, you can also create your own
personal set of QuickTime-based Automator actions.
 Podcast sharing. With Mac OS X v10.5 Leopard, you can easily send a movie file to
Podcast Producer, on a computer with Mac OS X Server v10.5 Leopard, for automatic
creation and delivery of podcasts.
System Requirements
For Mac OS computers:
 A 400 MHz or faster G3 PowerPC–based or Intel-based Macintosh computer
 At least 128 MB of RAM
 Mac OS X version 10.3.9 or later
For Windows computers:
 A Pentium processor–based PC or compatible computer
 At least 128 MB of RAM
 Windows XP Service Pack 2 or Windows Vista
Types of Files QuickTime Supports
You can open (import) dozens of types of media with QuickTime. Some of the formats
you can open in QuickTime include the following:
 Video formats: MOV, MPEG-1, MPEG-2,
1
MPEG-4, 3GPP, 3GPP2, JPEG, DV,
Motion JPEG, AVI, MQV, H.264
 Audio formats: AIFF/AIFC, Audio CD, CAF, MOV, MP3, MPEG-4, AU, WAV, iTunes audio
 Still-image formats: BMP, GIF, JPEG/JFIF, JPEG 2000, PDF, MacPaint, PICT, PNG,
Photoshop (including layers), SGI, Targa, FlashPix (including layers), TIFF (including
layers)
 Animation formats: Animated GIF, FLC, Flash, PICS
 Other formats: KAR (Karaoke), MIDI, QuickDraw GX, QuickTime Image File,
QuickTime VR, Text
1. MPEG-2 playback is available via the QuickTime MPEG-2 Playback Component, sold separately at the Apple Store
online. Because some file formats can contain many different kinds of audio and video, QuickTime may not be able
to play all audio and video formats within a particular file format.10 Preface Welcome to QuickTime
For a complete list of supported formats, see the Products area of the QuickTime
website.
To determine if QuickTime Player can open a file, choose File > Open File and select the
file you want to open. You will be able to select only files that can be imported.
Checking for New Versions of QuickTime
From time to time, Apple releases new versions of QuickTime. If you’re connected to
the Internet while using QuickTime Player, you’ll be notified when there’s a newer
version of QuickTime available. It’s a good idea to have the latest version of the
software installed on your computer.
To check for a new version of QuickTime (if you are using Mac OS X), choose QuickTime
Player > Update Existing Software. In Windows, choose Edit > Preferences > QuickTime
Preferences, and then choose Update Check.
Using Onscreen Help
While QuickTime is open, you can see instructions for performing tasks by choosing
Help > QuickTime Player Help.
Where to Go for Additional Information
Consult the resources listed below for more information about QuickTime:
 Latest QuickTime content listings. QuickTime Player includes an up-to-the-minute
guide to the best in QuickTime content. You can view the latest news, entertainment,
educational features, and more. You can also listen to audio programs. To view the
content guide, open QuickTime Player and choose Window > Show Content Guide.
You can also visit www.apple.com/quicktime.
 QuickTime News. For the latest news about QuickTime content and products, sign
up for the QuickTime newsletter at applenews.lists.apple.com/subscribe.
 Tutorials and tips. For step-by-step tutorials and a collection of instructional books
and CDs, visit www.apple.com/quicktime/resources.
 Discussion lists. Sign up with one of the many QuickTime-specific discussion lists to
post messages, exchange ideas and information, and keep current with the latest
QuickTime developments at www.apple.com/quicktime/resources.
 Developer support. If you’re interested in developing products using QuickTime, go
to developer.apple.com/quicktime.
 Technical support. To view all the support resources available, visit
www.apple.com/support.1
11
1 Using QuickTime Player
This chapter explains the basics of using
QuickTime Player.
Opening and Playing Files
You can open and play QuickTime movies in QuickTime Player or in your web browser.
Opening and Playing Movies in QuickTime Player
You can use QuickTime Player to play media stored on your computer’s hard disk, a CD,
a DVD, or the Internet.
To open a movie on your hard disk, a CD, or a DVD, do one of the following:
 In the Finder (or Windows Explorer), double-click the file or drag it to the QuickTime
Player application icon.
 Choose File > Open and select the file.
 Drag the file to the QuickTime Player icon in the Dock (Mac OS X only).
To open a movie on the Internet, open QuickTime Player, choose File > Open URL, and
enter the URL (the Internet address) for the movie file.
When audio is
detected, you’ll
see activity in
the equalizer.
Playhead
Volume
Play/Pause
Go to Fast-forward; go to end
beginning;
rewind
Drag to resize
the window.12 Chapter 1 Using QuickTime Player
QuickTime Player has onscreen controls similar to those found on CD players and DVD
players. Use the controls to play, pause, rewind, fast-forward, jump to the beginning or
end, and adjust the volume of a QuickTime movie. You can also use the controls to
move forward or backward in a movie.
To go to a specific point in the movie, drag the playhead (the small black triangle) in
the timeline. To step through frame-by-frame, first click the small black triangle and
then press the Right or Left Arrow keys on your keyboard.
Some movies have chapter lists you can use to jump to a specific point in a movie. If a
movie has a chapter list, a pop-up menu appears between the timeline and the
equalizer.
You can drag the handle in the lower-right corner of the window to resize the viewing
space.
Opening and Playing Files in a Web Browser
With the QuickTime plug-in (part of the free QuickTime software), you can play most
multimedia you encounter on the Internet within your web browser. On some
websites, movies play automatically. On other sites, you need to click an image of the
movie or a play button.
When a movie plays on a webpage, you typically see controls you can use to play,
pause, fast-forward, rewind, and adjust the volume of the movie.
To play a movie in a web browser, go to the website and follow the site’s instructions to
watch the movie.
Choose a chapter from
the pop-up menu to
jump to that chapter.
Volume
Play/Pause Rewind; fast-forward
QuickTime Pro menu
The playheadChapter 1 Using QuickTime Player 13
With QuickTime Pro, you also have the option of saving the movie to your hard disk (if
the author of the movie allows it). To save a movie from the web, click the downwardpointing arrow on the right and choose “Save as QuickTime Movie” or “Save as Source”
from the QuickTime Pro menu. If the movie is a Real-Time Streaming Protocol (RTSP)
movie, it is saved as a small “reference movie” that points to the actual movie on the
Internet.
The QuickTime website has a number of QuickTime movies (including the latest movie
trailers) that you can view in your web browser. Go to www.apple.com/quicktime.
Adjusting Playback Preferences for Internet Movies
When you watch movies on the Internet, they start playing automatically. You can,
however, download entire movies to your hard disk before they start playing so that
you can watch the movies at your convenience.
To download movies before they start playing (in Mac OS X):
1 Choose QuickTime Player > QuickTime Preferences and click Browser.
2 Deselect “Play movies automatically.”
To download movies before they start playing (in Windows):
1 Choose Edit > Preferences > QuickTime Preferences.
2 Choose Browser.
3 Deselect “Play movies automatically.”
So that you don’t have to download movies and images each time you view them on a
website, QuickTime can save these files in a storage area called a cache. If you view a
movie or image more than once, having the item cached improves performance. To
have QuickTime cache movies and images you view on the Internet, select “Save
movies in disk cache.” You might not want to select this option if you don't have
sufficient free space on your hard disk to allocate a cache, or if, for security reasons, you
don't want movie data stored in a cache file.
You can specify how big to make the cache by changing the Movie Cache Size setting.
How big you make the cache depends on how much free space your hard disk has. A
larger cache can hold more files (or larger files), but it takes up more space on your
hard disk.
After the QuickTime cache fills all the space reserved for it, older items are
automatically deleted from the cache when new items are added. To clear the cache,
click Empty Download Cache (in Windows, choose Download Cache in QuickTime
Settings and then click Empty Cache Now). You might want to clear the cache for
security or privacy reasons, or to recover free space on your hard disk.14 Chapter 1 Using QuickTime Player
QuickTime automatically detects your Internet connection speed so that you get the
highest-quality QuickTime content that your Internet connection can support. If movies
you’re watching on the Internet don’t play properly, however, it may help to change the
connection speed setting.
To change the connection speed setting in Mac OS X, open QuickTime Preferences and
click Streaming. In Windows, open QuickTime Preferences and choose Connection
Speed.
QuickTime tries to play versions of the movie authored to match the connection speed
you choose. If you choose a speed slower than your actual connection speed, the
resulting movie may be smaller in size and lower in quality than your connection can
actually support.
If you choose a speed faster than your actual connection, QuickTime playback may
stutter or appear jerky because it is sending more data than your connection can
support.
If you’re unsure of your connection speed, check with your Internet service provider
(ISP).
If you change your connection speed setting and later want to make QuickTime
automatically detect your speed again, choose Automatic from the Streaming Speed
pop-up menu (in Mac OS X).
To set the Internet connection speed in Windows, choose Edit > Preferences >
QuickTime Preferences, and then follow the directions above.
Instant-On
QuickTime includes Instant-On, a technology that dramatically reduces buffer (wait)
time when you view streamed video. Instant-On provides an instantaneous viewing
experience; you can navigate quickly through video as if it were on your hard disk.
To experience Instant-On, you must have a broadband connection. The responsiveness
of Instant-On is affected by available bandwidth and the size, or data rate, of the
content. It can also be affected by the codec used to compress the streaming video.
Instant-On is on by default. If you experience problems with streamed video, you can
change the wait time (drag the Play slider) or turn off Instant-On (open QuickTime
Preferences and click Streaming).
Viewing Streamed Files Behind a Firewall
QuickTime streaming chooses the best protocol (a method of communicating via the
Internet) for your needs. Typically, QuickTime streaming uses Real-Time Streaming
Protocol (RTSP) to ensure the best performance. If your network connection is
protected by a firewall, you may want to use the HTTP protocol instead.Chapter 1 Using QuickTime Player 15
To use HTTP streaming (in Mac OS X):
1 In QuickTime Player, choose QuickTime Player > QuickTime Preferences (or open
System Preferences and click QuickTime).
2 Click Advanced.
3 Choose Custom from the Transport Setup pop-up menu.
4 Choose HTTP from the Transport Protocol pop-up menu.
To use HTTP streaming (in Windows):
1 In QuickTime Player, choose Edit > Preferences > QuickTime Preferences.
2 Choose Advanced.
3 Choose Custom from the Transport Setup pop-up menu.
4 Choose HTTP from the Transport Protocol pop-up menu.
If QuickTime can configure itself for your firewall, you can now watch streaming
QuickTime movies. If you still experience problems, contact your network administrator
or see the information on the Apple QuickTime website (www.apple.com/quicktime).
Setting QuickTime to Handle More or Fewer File Types (MIME Settings)
When files are downloaded over the Internet, each file is assigned a MIME type to
indicate what kind of file it is. Your browser keeps track of which plug-in should be
used to display each kind of file.
QuickTime can display a wide variety of file types. To make QuickTime handle more or
fewer file types, you can edit the MIME type settings. If you edit the list, you can return
to the default list by following the instructions below and clicking Use Defaults.
To edit MIME settings in Mac OS X, open QuickTime Preferences and click Advanced. In
Windows, choose Edit > Preferences > QuickTime Preferences, choose Browser, and
click MIME Settings.
Viewing QuickTime Virtual Reality (QTVR) Movies
QTVR movies display three-dimensional places (panoramas) and objects with which the
user can interact. With a QTVR panorama, it’s as if you’re standing in the scene and you
can look around you up to 360 degrees in any direction. In a QTVR movie of an object,
you can rotate the object in any direction.
To pan through a QTVR movie, drag the cursor through the scene. To zoom in or out,
click the + or – button. (If the buttons are not showing, zoom in by pressing Shift; zoom
out by pressing Control.)16 Chapter 1 Using QuickTime Player
Some QTVR movies have hot spots that take you from one scene (or node) to another.
As you move the mouse over a hot spot, the cursor changes to an arrow. To see all the
places where you can jump from one node in a scene to another, click the Show Hot
Spot button (an arrow with a question mark in it). A translucent blue outline of any hot
spots within the currently visible VR scene appears. (If there are no hot spots, clicking
this button has no effect.) Click a hot spot to jump to a new scene.
To step backward scene by scene, click the Back button. (The Back button appears only
on QTVR movie windows, not in all QuickTime movie windows.)
Viewing Still Images
You can view still images in QuickTime Player. Choose File > Open File and select the
file, or drag the file to the QuickTime Player icon in the Dock (Mac OS X only).
Mac OS X: You can use Preview to convert a still image to other formats (Preview is in
the Applications folder on your hard disk). You can also convert many kinds of files
using QuickTime Pro. For more information, see “Converting Files into QuickTime
Movies” on page 28.
Windows: If you have QuickTime Pro, you can use PictureViewer to import and export
various types of still image file formats and to rotate images. PictureViewer is in the
QuickTime folder on your hard disk.
Playing MIDI Files
QuickTime Player can import MIDI (Karaoke MIDI, Standard MIDI, and General MIDI)
formats. To open a MIDI file, choose File > Open File and select the file.
QuickTime uses its built-in synthesizer to play MIDI files. You can also set QuickTime to
use an external synthesizer instead of the built-in one.
To specify a different synthesizer (in Mac OS X):
1 Open System Preferences, click QuickTime, and then click Advanced.
2 Choose the synthesizer you want from the Default Synthesizer pop-up menu.
To specify a different synthesizer (in Windows):
1 Choose Edit > Preferences > QuickTime Preferences.
2 Click Audio.
3 Select the synthesizer you want from the Default Music Synthesizer pop-up menu.Chapter 1 Using QuickTime Player 17
Opening Recently Used Files
You can easily open recently used files.
To open recently used files:
m Choose File > Open Recent > [option]
To change the number of items that appear in the Open Recent submenu (in
Mac OS X), choose QuickTime Player > Preferences, click General, and choose an option
from the Number of Recent Items pop-up menu. In Windows, choose Edit >
Preferences > Player Preferences.
Finding Movies Quickly Using QuickTime Favorites
You can easily find and open movies by putting pointers to them in your QuickTime
Favorites window. To view your list of favorites, choose Window > Favorites > Show
Favorites.
To add a movie to the Favorites list:
1 Open the movie in QuickTime Player.
2 Choose Window > Favorites > Add Movie As Favorite.
You can also drag a file to the Favorites list window.
To rearrange movies in the list, drag them. To delete an item from the list, drag the item
to the Trash or select the item and press the Delete key. (In Windows, drag the item to
the Recycle Bin or select the item and press the Backspace key.) Deleting an item from
the Favorites list does not delete the file from your hard disk (or wherever the file is
saved).
Playing Copy-Protected Movies
QuickTime movies can be encrypted so that only authorized viewers can watch them.
Such movies are known as “secured media files.” To use such a file, you must enter a
“media key,” which is usually available from the media file provider.
To enter a media key (in Mac OS X):
1 Open System Preferences, click QuickTime, and click Advanced.
2 Click Media Keys.
3 Click the Add button and then enter the key provided by the author or vendor.
To enter a media key (in Windows):
1 Choose Edit > Preferences > QuickTime Preferences.
2 Click Advanced.
3 Click Media Keys.
4 Click Add and then enter the key provided by the author or vendor.18 Chapter 1 Using QuickTime Player
Viewing Information About a File
QuickTime Player can display information about a QuickTime file, such as its
compression format, size, and frame rate while playing.
To view information about a file:
1 Open the file.
2 Choose Window > Show Movie Info.
With QuickTime Pro, you can see additional information about a movie by choosing
Window > Show Movie Properties. For more information about movie properties, see
“Changing Movie Properties” on page 38.
Controlling Playback
You can change playback options such as balance, playback speed, the size at which a
movie plays, and whether the QuickTime Player window shows. You can also optimize
movies for playback on certain computers.
Adjusting Audio and Video Settings
For any QuickTime movie with an audio track, you can adjust the right/left balance, as
well as the volume, bass, and treble levels. For any movie, you can also set playback
options such as speed and playback rate (the jog shuttle).
To set audio and video controls:
1 Choose Window > Show A/V Controls.
2 Drag a slider to adjust the setting.
Other playback options (for playing several movies at once or for playing a movie while
using another application, for example) are available in QuickTime Player Preferences.
To open QuickTime Player Preferences (in Mac OS X), choose QuickTime Player >
Preferences. In Windows, choose Edit > Preferences > Player Preferences. For more
information, see “Changing Playback Preferences.”
Changing Playback Preferences
You can change playback preferences by choosing QuickTime Player > Preferences. The
available options include:
 Open movies in new players: Select to open movies in a new player window;
deselect to replace the movie in the current player window with the new movie.
 Automatically play movies when opened: Select to make all movies start playing
when they’re opened; deselect to have the movie start when you click the Play
button.
 Use high-quality video settings when available: When this option is selected, video
looks sharper and smoother, but more processor capacity is used.Chapter 1 Using QuickTime Player 19
 Play sound in frontmost player only: Select to play the audio for only one
QuickTime Player window (the active window); deselect to play the sound of all
playing movies simultaneously.
 Play sound when application is in background: Select to play audio even if
QuickTime is not the frontmost application; deselect to mute the audio when
QuickTime is not the active application.
 Show equalizer: Select or deselect to show or hide the equalizer (which shows the
presence of audio) in the QuickTime Player window.
 Show Content Guide automatically: Select to see the latest content listings when
QuickTime Player first opens (unless you open a specific movie file).
 Pause movie before switching users: Select to automatically pause a movie when
you use fast user switching to let another person use your computer.
 Hide selection indicators for empty selection: Select to have the selection
indicators in the timeline removed when no frames are selected.
 Show closed captioning when available: Select to see the closed caption
information, if captions have been provided by the movie’s creators.
With QuickTime Pro, more options are available. For information about them, see
“Getting QuickTime Pro” on page 23.
Viewing Movies at Full Screen
You can set the screen so that only the movie is visible, not the QuickTime Player
window, desktop, or other windows. This presentation setting is called “full-screen
mode.” (You can also set a movie to play at half size, double size, or other sizes.)
To play a movie at full screen, do one of the following:
 Choose View > Full Screen.
 Choose View > Present Movie, choose Full Screen, and click Play.
To quit full-screen mode, press Esc. To adjust the way the picture is sized to fit your
screen, such as stretched to fit or in letterbox format, move the pointer to the top of
the screen to display the QuickTime Player menu options, and then choose a setting
from the View menu. The following additional options are available in full-screen mode:
 Fit to Screen: The content is scaled to fill your screen as fully as possible without
cropping the movie or changing the aspect ratio.
 Zoom: The content is scaled and cropped to completely fill your screen in at least
one dimension. This can eliminate black areas on the top (letterboxing) or side
(pillarboxing) but may hide or distort the content.
 Panoramic: The content is scaled to fit your screen and the outer horizontal edges
compressed to avoid cropping the image.
You can also cycle through all of the available full-screen options by clicking the button
in the movie controls that appear when you move the pointer. 20 Chapter 1 Using QuickTime Player
You can also set options for all movies playing at full screen. For example, you can hide
the movie controls or change the amount of time they’re displayed before being
hidden. To set these options in Mac OS X, choose QuickTime Player > Preferences and
click Full Screen. To set these options in Windows, choose Edit > Preferences >
Player Preferences, and then click Full Screen.
Note: As long as “Display full-screen controls” is selected in QuickTime Player
Preferences, you can make hidden controls appear by moving the pointer.
Changing Movie Size for Playback
QuickTime Player includes several options for changing movie playback size.
To change a movie’s playback size, choose View > [a size], or drag the resize control in
the lower-right corner of the window. To stretch the movie in any direction, hold down
the Shift key when you drag (holding down the Shift key while dragging doesn’t
preserve the aspect ratio).
To return the movie to its default size and aspect ratio, press Command-1 (in Windows,
press Alt-1).
You can also view movies at full screen, with additional sizing options available during
full-screen playback. For more information, see “Viewing Movies at Full Screen” on
page 19.
Looping a Movie
You can play a movie repeatedly. When the movie finishes, it automatically starts
playing again.
To loop a movie:
m Choose View > Loop.
With QuickTime Pro, you can also play the movie forward and then backward
repeatedly by choosing View > Loop Back and Forth.
Simultaneously Playing Multiple Movies
You can have more than one QuickTime Player window open at a time.
To open more than one QuickTime Player window, do one of the following:
 Double-click another movie file.
 Choose View > Play All Movies.
By default, when you have more than one QuickTime Player window open, the audio
plays only on the active (frontmost) QuickTime Player window. For information about
changing this setting, see “Changing Playback Preferences” on page 18.Chapter 1 Using QuickTime Player 21
Using Frame Number and Time Codes
When you’re viewing a movie in QuickTime Player, you can display the current movie
time or frame number, or the SMPTE time code if the movie has a time code track.
(Some applications, such as Final Cut Pro, automatically add a time code during
capture.)
Displaying Frame Numbers, Movie Time, or Time Code
The area next to the timeline in QuickTime Player displays the time information for the
current movie.
1 Click the time display area.
2 Choose an option from the pop-up menu that appears:
 Standard: Displays movie time in HH:MM:SS format.
 Time Code: Displays the movie’s time code in HH:MM:SS:Frame format. Either the
time code or drop-frame time code will be displayed, depending on the frames per
second of the movie. A colon in the frame segment of the time notation indicates
that a non-drop time code is being displayed. A semicolon indicates a drop-frame
time code. If the movie has a time code track, it will be used. Otherwise, the time
code will be calculated from 00:00:00:00 at the start of the movie.
 Frame Number: Displays the frame number, incrementing from 0 at the start of the
movie. An “f“ in the time display area indicates that the frame count is being
displayed.
Navigating a Movie by Frame Number or Time Code
You can jump to a point in a movie by entering a specific frame number or time code.
 Double-click the time display, and then press the arrow keys or type a new time or
frame number.
 To select the entire time display, double-click the area, or click the area and then
press Command-A (in Mac OS X) or Control-A (in Windows).
To enter a time, separate each unit with a period. For example, 5.02.10 will go to five
minutes, two seconds, and 10 frames. To go to five minutes, zero seconds, and 10
frames you can enter 5..10.22 Chapter 1 Using QuickTime Player
Finding Text in a Text Track
Some movies contain text such as titles, credits, subtitles, or section headings. You can
search for text in a movie so that, for example, you can find specific frames in the
movie.
To search for text in a QuickTime movie:
1 Choose Edit > Find > Find.
If this command is unavailable, the movie does not have a text track.
2 In the Find dialog, type the text you are looking for and click Next.
Preventing Users from Changing QuickTime Settings
If you’re using a computer in a public setting (at a kiosk, for example), you can prevent
users from changing QuickTime settings and saving movies from the Internet.
To set up QuickTime for use on a public computer (in Mac OS X):
1 Open System Preferences, click QuickTime, and click Advanced.
2 Select “Enable kiosk mode.”
To set up QuickTime for use on a public computer (in Windows):
1 Choose Edit > Preferences > QuickTime Preferences.
2 Choose Browser Plug-in.
3 Select “Enable kiosk mode.”
Viewing Movies that have Flash Content
Some QuickTime movies contain a Flash track . To enable these movies to play properly,
you must turn on support for Flash within QuickTime.
To enable Flash playback in QuickTime movies (in Mac OS X):
1 Open System Preferences, click QuickTime, and click Advanced.
2 Select “Enable Flash.”
To enable Flash playback in QuickTime movies (in Windows):
1 Choose Edit > Preferences > QuickTime Preferences.
2 Choose Advanced.
3 Select “Enable Flash.”2
23
2 Getting Started
with QuickTime Pro
Learn how to use the advanced playback options in
QuickTime Pro, create movie postcards, and share them
via email or the web.
Getting QuickTime Pro
To get QuickTime Pro, choose a QuickTime Pro menu item and click Buy Now, or choose
QuickTime Player > Buy QuickTime Pro.
You must be connected to the Internet using the computer on which you want
QuickTime Pro installed. You may need to restart QuickTime Player to make the new
options available.
Using Advanced Playback Options
With QuickTime Pro, you have additional options for playing movies, such as playing a
movie on a second display, and more.
Playing a Movie on a Second Display
With QuickTime Pro and a two-display setup with dual display support, you can play a
movie on one display while working in another application on the other display. This
arrangement is useful for presentations.
Mac OS X: Make sure Mirror Displays is not selected. (Open System Preferences, click
Displays, and click Arrangement. If you don’t see an Arrangement button, your
computer does not support this feature.)
Windows: Whether you can play a movie on a second display depends on your
computer and monitor. Open the Display control panel, click Settings, and make sure
that the second display is enabled. If it is not enabled, click it and make sure “Extend
my Windows desktop onto this monitor” is selected.24 Chapter 2 Getting Started with QuickTime Pro
To play a movie on a second display:
1 Open a movie in QuickTime Player.
2 Choose View > Present Movie.
The two displays are shown side by side; one contains the menu bar. The letter “Q”
appears on the display on which the movie will play. To play the movie on the other
display, click it.
3 Choose an option from the pop-up menu.
To play the movie without displaying the QuickTime Player controls, choose Full Screen.
4 Select Movie or Slideshow mode.
In slideshow mode, you can advance frames by clicking the mouse or pressing the
Right Arrow or Left Arrow key.
5 Click Play.
You can open other applications while the movie is playing. To make another
application active, press Command-Tab (in Windows, Alt-Tab). You can now use the
mouse and keyboard in other applications while the movie continues to play.
To stop the movie before it ends, press Command-Tab (in Windows, Alt-Tab) to make
QuickTime Player active, and then click the mouse.
All QuickTime movie playback keyboard shortcuts are available in full-screen mode.
Presenting a Movie as a Slideshow
In a slideshow, the viewer clicks to advance to the next frame. With QuickTime Pro, you
can set a movie to play as a slideshow.
To play a movie as a slideshow:
1 Choose View > Present Movie.
2 Click Slideshow, then click Play.
3 To advance the slideshow, click the mouse or press the Left or Right Arrow keys.
Changing the Color Around a Movie
By default, the onscreen area around the edge of a movie playing in full-screen mode is
black, but you can change it to another color.
To change a movie’s border color:
1 Choose View > Present Movie.
2 Click the color well to the right of the pop-up menu, then choose a color from the
Colors window.
If you have more than one display, you can have this color appear on all displays (not
just the one playing the movie), by selecting “Display background color on all screens.”Chapter 2 Getting Started with QuickTime Pro 25
Loading Movies into RAM for Better Playback
QuickTime has two memory (RAM) options you can use to improve playback
performance. Preload puts the entire movie into memory before it is played; Cache
keeps movie data in memory after it has played. This option is useful for small files you
want to loop.
With QuickTime Pro, you can adjust memory options for a QuickTime movie track.
To adjust memory options for a track:
1 Choose Window > Show Movie Properties.
2 Select the track you want to adjust and click Other Settings.
3 To put the track into memory, select “Preload this track.”
4 To keep track data in memory, select Cache.
Use these options only with tracks that contain very small amounts of data; too much
data in memory may cause poor performance, system errors, or unpredictable results.
Creating Movies and Other Media
With QuickTime Pro, you can create movies in various ways.
Recording Video and Audio
With a video camera and a Macintosh computer you can use QuickTime Pro to record a
movie. QuickTime Pro can capture video from most FireWire-equipped sources,
including the Apple iSight, DV cameras, and some webcams. With a Macintosh or
Windows computer, you can also record audio using a built-in or external microphone.
To record audio or video with QuickTime Pro:
1 Connect the camera or microphone to the computer (unless you are using a built-in
microphone).
2 In QuickTime Pro, choose File > New Movie Recording (or File > New Audio Recording).
A preview window appears, which you can use to adjust settings such as camera
position, lighting, and audio level before you start recording.
3 To start recording, click the Record button at the bottom of the window.
4 To stop recording, click the button again.
The movie you just recorded appears in a QuickTime movie window. By default, the
movie is saved on the desktop, but you can choose a different default location in the
Recording pane of QuickTime Player Preferences. To see where the movie has been
saved, Command-click the icon at the top of the window.26 Chapter 2 Getting Started with QuickTime Pro
Setting Recording Options
When you first use QuickTime Pro to record video or audio, settings are automatically
chosen for you. If you want, you can change settings such as which recording device
and format to use, and where recorded movies are stored.
To change recording options:
1 Choose QuickTime Player > Preferences.
2 Click Recording (or Audio Recording in Windows).
3 Choose the desired options for your video source, microphone, and quality, and then
choose a default location to store recorded files.
About Saving Movies
With QuickTime Pro, you can create and edit movies, and then save them. When you
choose File > Save As, you can save the movie as one of the following:
 A self-contained movie includes all the data (video, audio, and so on) you used to
create the movie within a single file.
 A reference movie contains pointers to other movies (or parts of movies) stored
elsewhere, such as in different folders on your hard disk or even on a web server.
Pointers to other movies are created when, for example, you copy and paste part of
a movie from one movie into another.
If you are concerned about free space on your hard disk and can be sure your
source movies won’t change location, you can save your movie as a reference
movie; the media you copy and paste is stored as a space-saving pointer to that
media, rather than being stored entirely inside your new movie file.
When you play a reference movie, QuickTime follows the pointers to access and
play the other movies (or parts of movies). To determine whether a movie contains
pointers to other data, choose Window > Show Movie Properties, select the movie
at the top of the window, and click Resources. If the file containing the movie does
not appear in the list, then the movie has pointers and is not self-contained. In Mac
OS X, you can Command-click the icon to see the name and location of the file that
contains the movie.
The term “reference movie” is also used for the files you can create to intelligently
deliver different-sized streams to different users depending on their connection
speeds. For more information, see “Creating Reference Movies to Optimize Web
Playback” on page 48.Chapter 2 Getting Started with QuickTime Pro 27
Saving Movies from the Internet
With QuickTime Pro, you can save (download) a movie viewed in your web browser to
your hard disk. (The movie must be authored to allow for saving.) If it’s a streaming
movie, QuickTime Pro saves a small “reference movie” that points to the stream.
To save an Internet movie on your hard disk:
1 When the movie finishes loading (when the entire progress bar is filled with gray), click
the down arrow in the playback controls.
2 Choose “Save as QuickTime Movie.”
If this command is not available, the movie is authored so that it cannot be saved.
Creating a Slideshow or Animation from Still Images
With QuickTime Pro, you can combine a series of still images to create a movie that
plays like a slideshow. This process is an easy way to share the pictures from your
digital camera or mobile phone.
Note: Slideshows look best when all the images are the same size.
To create a slideshow from still images:
1 Put all the graphic files you want to include in a folder.
2 Name each file with the same name followed by an increasing number; for example,
“picture1,” “picture2.”
Most digital cameras number files automatically. The numbers must be increasing but
don’t have to be precisely sequential (for example, you could name the files “picture1,”
“picture5,” “picture10,” and so on).
3 In QuickTime Player, choose File > Open Image Sequence, and then select the first file.
4 Choose a frame rate (the number of frames displayed per second) from the Frame Rate
pop-up menu.
Slideshows usually work best when slides are shown at 2 to 3 seconds per frame.
QuickTime Pro creates the movie, which shows each picture in sequence.
5 Choose File > Save to name and save the movie.28 Chapter 2 Getting Started with QuickTime Pro
You can add music to your slideshow by adding an audio track to your movie before
saving it. Open an audio file, select the portion you want to add to the slideshow, and
choose Edit > Copy. Select the slideshow (or a portion of it) and choose Edit > Select
All, then choose Edit > “Add to Selection and Scale.” The audio is sped up or slowed
down to fit the length of the paste destination (the pitch remains the same). For best
results, make the slideshow length match that of the audio as closely as possible. You
can also lengthen a soundtrack by adding multiple audio files to the movie, each
beginning at a different point.
Alternatively, you can keep the original audio speed and alter the image speed by
opening a new player window, copying and pasting the audio into the new window,
and then copying the slideshow and pasting it into the new window by choosing
Edit > “Add to Selection and Scale.”
If you’re using Mac OS X: You can also use the recording feature in QuickTime Pro to
narrate your slideshow. See “Recording Video and Audio” on page 25.
Creating a Still Image from a Movie
With QuickTime Pro, you can export a single frame from a movie as an image file.
To save a still image from a movie:
1 Move the playhead to the frame you want to export.
2 Choose File > Export.
3 Choose “Movie to Picture” from the Export pop-up menu.
4 Click Options and choose a format from the “Compression type” pop-up menu.
To export every frame from the movie as a series of images, choose “Movie to Image
Sequence.” Exporting every frame can generate a very large number of files; you may
want to export to a folder rather than to the desktop.
Converting Files into QuickTime Movies
If you have QuickTime Pro, you can use QuickTime Player to convert many types of
video, audio, graphics, and animation files (including Flash files) into QuickTime movies.
To convert a file into a QuickTime movie, open it in QuickTime Player and then choose
File > Save.Chapter 2 Getting Started with QuickTime Pro 29
Sharing Movies by Email or the Web
With QuickTime Pro and Mac OS X it’s easy to create movies that are just right for
sharing with others by email or on your .Mac HomePage. Simply select how you want
to share your movie, and QuickTime Pro automatically creates a file suitable for that
delivery method. (To use the Share feature to put your movie on the web, you need a
.Mac account.)
To share a movie:
1 Choose File > Share.
2 Click Email or HomePage.
3 Choose a name and size for the movie.
4 If you are going to publish your movie on the web, you can type a name for the movie
(the name you type will appear on the webpage).
5 Click Share.
While the movie is being exported, you can click the “x” to cancel the export if
necessary.
If you click Email, a new message window opens in Mail, with your movie attached. If
you click HomePage, your browser opens to the specified webpage, with the movie
embedded. Send the URL to friends so that they can view the movie.
Sharing Movies for Podcast Producer
With QuickTime Pro and Mac OS X, you can create a movie for use with Podcast
Producer, an application included with Mac OS X Server v10.5 Leopard.
Note: This option is available only if you have the Podcast Capture application installed
on your computer.
To share a movie to Podcast Producer:
1 Choose File > Share.
2 Click Podcast Producer.
3 Enter your user name, password, and server name, then click Login.
4 Choose a Podcast Producer workflow from the pop-up menu.
See the Podcast Producer Administration Guide, or your network administrator, for
information about these settings.
5 Click Share.3
30
3 Editing and Authoring
with QuickTime Pro
Learn how to use QuickTime Pro to edit movies,
manipulate movie tracks, and much more.
Simple Editing
With QuickTime Pro, you can perform movie-editing tasks.
Selecting and Playing Part of a Movie
To perform editing functions such as Copy and Delete, in most cases you need to first
select the desired portion of a movie. (If you don’t select anything, the edit commands
work on the current frame.)
To select a portion of a movie, move the In and Out selection markers. The darkened
area between the two markers indicates the selected portion. To fine-tune the
selection, select a marker and move it with the arrow keys. You can also move the
playhead and press I (for In) or O (for Out) to set the start or end point of the selection,
even while the movie is playing.
To play the selection, choose View > Play Selection Only (so that the checkmark
appears), then click Play. To play the whole movie, choose View > Play Selection again
(to remove the checkmark).
With QuickTime Pro, you can save the movie (choose File > Save) so that the next time
it is opened, only the part you selected plays.
Tip: To move the In or Out marker
to a different position, drag the
playhead to the desired position
(or use the arrow keys), then press
I or O.
In and Out markers,
showing the selected
portion of the movie
The playheadChapter 3 Editing and Authoring with QuickTime Pro 31
Note: By default, the selection markers hide when nothing is selected, making it easy
to determine whether or not a frame is selected. To turn off this option so that the
selection markers appear even when nothing is selected, change the “Hide selection
indicators for empty selection” option in QuickTime Player preferences.
Cutting, Copying, or Deleting a Section of a Movie
Selecting and moving, copying, or deleting (trimming) part of a movie is easy in
QuickTime Pro.
To cut, copy, or delete part of a movie:
1 Move the playhead until the desired frame appears, or select the part of the movie you
want to modify (use the In and Out selection markers and the arrow keys).
2 Choose Edit > Copy, Cut, or Delete.
If you choose Copy or Cut, you can paste the selection elsewhere.
3 Position the playhead where you want to paste the selection and choose Edit > Paste.
QuickTime Pro inserts the selection you pasted at the position of the playhead.
You can also delete all parts of a movie that are not selected by choosing Edit > “Trim
to Selection.”
Note: After you delete parts of a movie, the file size stays the same until you choose
File > Save As and select “Save as a self-contained movie.”
Combining Two QuickTime Movies into One
With QuickTime Pro, you can easily add one movie to another to make one longer
movie.
To combine two movies:
1 In QuickTime Player, choose Edit > Select All to select the entire contents of the first
movie.
2 Choose Edit > Copy, then open the second movie.
3 Move the playhead to the point at which you want to insert the movie (usually the very
beginning or end of the original movie), and choose Edit > Paste.
4 Choose File > Save As to name and save the new movie.32 Chapter 3 Editing and Authoring with QuickTime Pro
Working with Tracks
A QuickTime movie is made up of one or more “tracks.” Each track stores a particular
kind of data. For example, a QuickTime movie could have a video track, music tracks,
and sound effects tracks.
With QuickTime Pro, you can edit tracks individually. You can move tracks from one
movie to another, turn a track on or off, delete tracks, or modify the information
contained in a track.
Turning Tracks On or Off
With QuickTime Pro, you can choose one or more tracks to enable or disable. For
example, you might want to turn off tracks to simplify editing, or to hide a track in a
final movie. When you export a movie, only enabled tracks are exported.
To turn movie tracks on or off:
1 In QuickTime Player, choose Window > Show Movie Properties.
The movie’s tracks appear in the list at the top of the Properties window.
2 Use the Enable checkboxes to turn tracks on (selected) or off (deselected).
To delete a track, drag it to the Trash, or select it and click Delete,.You can also choose
Edit > Cut, or press the Delete key.
Note: For audio tracks, other options are available by clicking Audio Settings. To play
only the audio in the selected track, select Solo. To play the movie without audio, select
Mute.
Extracting, Adding, and Moving Tracks
With QuickTime Pro, you can create a new movie from one or more tracks of an existing
movie, while leaving the original movie file intact. For example, you could create a
movie that uses only the audio from an existing movie. To do so, you extract the
desired tracks.
You can also add the extracted track to an existing movie.
Audio narration
Video 1
Video 2
Text title
Text credits
Audio sound effectsChapter 3 Editing and Authoring with QuickTime Pro 33
To extract a track (and add it to another movie):
1 Choose Window > Show Movie Properties.
2 Select the desired track or tracks and click Extract.
You can select more than one track by holding down the Shift key when you click.
QuickTime creates a new movie containing the extracted tracks.
3 To add the extracted track to another movie, select the movie (or the portion of it you
want your pasted media to fit into) and choose Edit > “Add to Movie.”
When you add a track to a movie, the track’s duration is unaltered. For example, if you
add a 10-second sound track to a 1-minute movie, the sound track plays for 10 seconds,
starting at the position in the movie where you added the track.
To “scale” a track so that it stretches or compresses to a particular length, drag the In
and Out markers of the target movie to select the duration you want the new track to
cover and then choose Edit > “Add to Selection and Scale” in step 3. Scaling audio may
change the speed of the audio (although the pitch remains the same when you play
the movie in QuickTime Player). You could add video to sound instead, and speed up or
slow down the video to match the audio. You might have better results if you compare
the timelines of the two tracks and cut from one or the other until they have the same
duration.
Working with Audio Tracks
QuickTime audio includes music tracks, which contain MIDI or other data, and sound
tracks, which contain digitized audio.
Adding an Audio Track to a QuickTime Movie
You can easily add audio and other tracks to a QuickTime movie.
To add an audio track to a movie:
1 In QuickTime Player, choose File > Open File and select the audio file you want to
import.
2 In the QuickTime Player window that opens, choose Edit > Select All to select the entire
audio file, then choose Edit > Copy.
3 Open the movie to which you want to add the audio.
4 To add the audio to the whole movie, choose Edit > Add. To add the audio to a part of
the movie, select a part and choose Edit > “Add to Selection and Scale”.
“Add to Selection and Scale” slows down or speeds up the audio track to fit the length
of the selected part of the movie; the pitch remains the same (when you play the
movie in QuickTime Player). You could add video to sound instead, and speed up or
slow down the video to match the audio. You might have better results if you compare
the timelines of the two tracks and cut from one or the other until they have the same
duration.34 Chapter 3 Editing and Authoring with QuickTime Pro
Note: If your audio and video are created by the same device, such as a DV camera,
and are created at the same time, the audio and video will be synchronized.
Changing Sound Track Volume Levels and Other Audio Settings
With QuickTime Pro, you can change the volume and balance of audio and music
tracks. For example, if a movie has more than one audio track, you can adjust the
volume of the tracks relative to one another. You can also change the bass and treble
levels.
To change settings for an audio track:
1 In QuickTime Player, choose Window > Show Movie Properties.
2 In the Properties window, select the audio track and click Audio Settings.
3 Drag the sliders to adjust the settings.
4 Use the pop-up menu to the right of each audio channel to specify where the channel’s
sound should be directed.
To direct a channel's sound to the subwoofer, choose LFE Screen. To specify a particular
output for the audio device, choose one of the Discrete options. To silence a channel,
choose Unused.
5 To turn off the audio (without having to delete the track), select Mute. To play only the
selected audio track, select Solo.
6 To save the balance and channel settings with your movie, choose File > Save or
Save As.
Presenting Multiple Movies in the Same Window
With QuickTime Pro, you can place multiple video tracks in the same window to play
movies side by side or to create a picture-in-picture effect.
To present multiple movies in the same window:
1 In QuickTime Player, choose Edit > Select All to select the entire contents of the first
movie.
2 Choose Edit > Copy, then open the second movie.
3 Move the playhead to the point at which you want the first movie to begin playing
(usually the beginning or end of the original movie), and choose Edit > “Add to Movie.”
4 Choose Window > Show Movie Properties, select the new video track, and click Visual
Settings.
5 Use the Current Size and Layer controls to set the new video to a desired size and layer
(layers with lower numbers are farther forward, or more “on top”).
For example, for a picture-within-a-picture effect, with the added movie inside the
original movie, make the new movie smaller and assign it a lower layer number.Chapter 3 Editing and Authoring with QuickTime Pro 35
Pasting Graphics and Text into a Movie
With QuickTime Pro, you can paste graphics and text into a QuickTime movie.
If a pasted graphic is larger than the movie’s dimensions, QuickTime Pro resizes the
movie to fit the dimensions of the graphic. For best results, size graphics (using a
graphics program) to match the movie size before you insert them. You can export a
single frame from the movie to use as a guide for text placement. (See “Creating a Still
Image from a Movie” on page 28.)
To find a movie’s dimensions, choose Window > Show Movie Properties, select the
video track, and click Visual Settings.
To add graphics or text:
1 Copy the text or graphic to the Clipboard.
2 In QuickTime Player, move the playhead to the point at which you want the copied
item to appear.
3 Choose Edit > Paste.
This procedure inserts the graphic into the movie at the Paste location, in its own
frame. To paste the graphic onto the frame at the Paste location, choose Edit >”Add to
Movie.”
To make a graphic show up in more than one frame, select the portion of the movie
you want to add it to and choose Edit > “Add to Selection and Scale.” You can use this
technique to add a company logo throughout a movie. (Also see “Changing a Track’s
Transparency” on page 39.)
Working with Text Tracks
You can add text to a QuickTime movie to create titles, credits, and subtitles. With
QuickTime Pro, text tracks are searchable, so you can use keywords to find precise
frames in the movie. The following topics provide details about adding text tracks.
Adding a Text Track to a QuickTime Movie
With QuickTime Pro, you can import a text file into a QuickTime movie.
To add a text track:
1 Create a text file containing the text you want in the movie, and save the file as text
only (.txt).
Separate each paragraph with a return character. Each paragraph appears in a separate
frame of the movie. By default, each text frame is displayed for 2 seconds.
2 In QuickTime Player, choose File > Open File and select the text file.
3 Click Open.36 Chapter 3 Editing and Authoring with QuickTime Pro
Overlaying a Movie with Text
With QuickTime Pro, you can use QuickTime Player to overlay (superimpose) text on a
specific part of an existing movie.
To overlay text:
1 In QuickTime Player, choose File > Open File and then select the text file.
2 Choose Edit > Select All and then choose Edit > Copy. (In Windows, click Options,
select the Keyed Text checkbox, and copy the track).
3 Select the part of the movie on which you want to overlay the text.
4 Choose Edit > “Add to Selection and Scale.”
5 Save as a self-contained movie.
The text appears throughout the part of the movie you selected. For information about
adjusting how long each line of text displays, see “Setting the Frame Duration of a Text
Track” on page 36.
Specifying Font Styles for Text Tracks
With QuickTime Pro you can change the font attributes of a text track already in a
movie. To do so, you export the track, make changes, then reimport the track.
To change font styles for the text track:
1 In QuickTime Player, choose File > Export.
2 Choose “Text to Text” from the Export pop-up menu.
3 Click Options and select “Show Text, Descriptors, and Time.”
4 Use a text editor to alter the values after the {QTtext} tag.
5 Import the text track back into your movie.
In Windows, click Convert. To import the text with the default settings, click Save. To
select different settings (such as font attributes), click Options.
You can also insert tags throughout the text to change values while the movie plays.
Setting the Frame Duration of a Text Track
With QuickTime Pro, you can set the duration of each frame in an existing text track to
a value other than 2 seconds. To do so, you export the track, make changes, then
reimport the track.
To change the current text frame information:
1 In QuickTime Player, choose File > Export and choose “Text to Text” from the Export
pop-up menu.
2 Click Options and select “Show Text, Descriptors, and Time.”
3 Edit the information in the text file and then import the track back into the movie. Chapter 3 Editing and Authoring with QuickTime Pro 37
The duration for each line of text in the text file appears on a separate line before the
line of text. The time you type is the length of time after the movie has started at which
this line of text will appear.
Timestamps are specified as hours:minutes:seconds:fractions of a second (the default
Text to Text export setting is 1/600th of a second). For example, if you enter the time
00:02:11:00, the text on the following line appears at 2 minutes and 11 seconds into
the movie.
For information about the other text track descriptors, see the developer section of the
QuickTime website at www.apple.com/quicktime.
Specifying Languages for Individual Tracks
With QuickTime Pro, you can create a movie with support for multiple languages by
specifying a language for an individual track. For example, you can create a movie that
contains a separate audio track for each language. QuickTime automatically plays the
correct track, based on the language setting of the user’s computer.
To specify languages:
1 Create or assemble the alternate tracks.
Record voiceovers in each desired language or create text tracks to use as subtitles.
Save each alternate track as a self-contained movie, and put all the alternates together
in a single folder.
2 Put a copy of your original movie, self-contained and minus any tracks that are now
stored as alternates, in the folder with the alternates.
3 Open the movie and choose Window > Show Movie Properties.
4 In the Properties window, select a sound or text track and click Other Settings.
5 Choose the language of this track from the Language pop-up menu.
6 Choose a track to use when a different language is selected from the Alternate pop-up
menu.
7 Save as a self-contained movie (choose Edit > Save As and make sure “Make movie selfcontained” is selected).
8 Repeat these steps for additional language tracks; each time, choose the previously
selected language from the Alternate pop-up menu.38 Chapter 3 Editing and Authoring with QuickTime Pro
Changing Movie Properties
The following sections describe how to resize or rotate a movie, set a movie’s poster
frame, and more.
Adding Annotations to a Movie
With QuickTime Pro, you can add annotations to document information about the
movie, such as its author, director, and copyright information. You can annotate the
entire movie and any of its individual tracks.
To annotate a movie:
1 In QuickTime Player, choose Window > Show Movie Properties.
2 Select an item from the list and click Annotations.
3 Choose an annotation to add from the Add Annotation pop-up menu.
4 Enter the annotation in the Value column of the list.
Users who don’t have QuickTime Pro see only three of the annotations the movie
contains. (Which three appear depends on which annotations the movie contains.)
Resizing, Flipping, or Rotating a Movie
With QuickTime Pro, you can change the size and orientation of a video track of a
movie.
To resize or rotate a QuickTime movie:
1 In QuickTime Player, choose Window > Show Movie Properties.
2 In the Properties window, select a video track and click Visual Settings.
3 To resize the movie, type new numbers in the Current Size fields.
To keep the same height-to-width proportions, select Preserve Aspect Ratio.
4 To rotate the movie, click one of the rotate buttons.
To restore the movie to its original appearance, click Reset.
Flip horizontal
or vertical
Rotate right or leftChapter 3 Editing and Authoring with QuickTime Pro 39
Changing a Movie’s Shape with a Video Mask
With QuickTime Pro, you can change the shape of a movie from rectangular to other
shapes using a video mask. In combination with a media skin; you can “skin” a movie so
that it plays in a non-rectangular region (for example, a movie could play from within a
ship porthole), and then use a mask to restrict the movie’s shape to the desired
playback region.
Use a graphics program to create the mask and save it as a QuickTime-compatible file
(for example, BMP, GIF, JPEG, or PICT). The mask should be a black shape on a white
background. The movie appears through the black shape.
To add a video mask:
1 In QuickTime Player, choose Window > Show Movie Properties.
2 Select the video track you want to assign the mask to, then click Visual Settings.
3 Drag the mask file to the Mask well in the Properties window, or click Choose to select
the file.
Changing a Track’s Transparency
With QuickTime Pro, you can create a track that is partly transparent. This technique is
useful, for example, for overlaying a movie with a logo.
To change a track’s transparency:
1 Add the track to the movie. (See “Extracting, Adding, and Moving Tracks” on page 32.)
2 Choose Window > Show Movie Properties.
3 Select the track and click Visual Settings.
4 Choose Blend from the Transparency pop-up menu and drag the Transparency Level
slider.
Creating a Chapter List for a Movie
With QuickTime Pro, you can create a pop-up chapter list to navigate to specific points
in a movie. First you create a list of topics (or entry points), and then you import the list
into the movie as a text track. When you play the movie in QuickTime Player, the
current chapter displays in the movie controller. (See “Opening and Playing Movies in
QuickTime Player” on page 11.)
To create a chapter list:
1 In a text editor or word processor, type your list of chapters and save the document as
plain text.
Make each item very short (preferably one word but no more than two or three words)
and separate each item with a return character.
2 In QuickTime Player, choose File > Open File, select the text file, and click Open. 40 Chapter 3 Editing and Authoring with QuickTime Pro
3 Choose File > Export. In the Export pop-up menu, choose “Text to Text.” In the Use
pop-up menu, choose “Text with Descriptors.”
4 Click Options. In the Text Export Settings dialog, select “Show Text, Descriptors, and
Time”; select “Show time relative to start of Movie”; and set fractions of seconds to 1/30
(the default is 1/1000).
5 Click OK, then click Save to create a text file with descriptors.
6 Open the exported list in your text editor or word processor, and open the target
movie in QuickTime Player.
7 Choose Window > Show Movie Info.
8 In QuickTime Player, drag the playhead on the timeline to find the first point in the
movie where you want to begin a new chapter.
Use the Right and Left Arrow keys to step forward or backward a frame at a time as
needed. Note the current time in the Properties window.
9 In the text file, find the first chapter title and change the timestamp just before that
chapter title to the time you noted in the Properties window.
The timestamp might now read, for example, [00:01:30.15], meaning that selecting the
first chapter title will jump the viewer 1 minute, 30 seconds, and 15 frames into the
movie.
10 Repeat steps 9 through 11 until you’ve identified all the places in the movie that
correspond to the chapter divisions and you’ve entered the proper timestamps in the
text file.
11 Change the last timestamp (the one after the last chapter title in the text file) to match
the duration of the movie.
12 Save the text file and import it into QuickTime Player.
QuickTime creates a new movie with just a text track.
13 Choose Edit > Select All, choose Edit > Copy, and close the movie.
14 Click in the main movie, choose Edit > Select All, and then choose Edit > “Add to
Movie.”
QuickTime adds the text track to the movie.
15 Choose Window > Show Movie Properties.
16 In the Properties window, select the video or audio track you want to associate with
the chapter track, and click Other Settings.
17 Choose the main video or audio track from the Chapters pop-up menu.
If you have a movie with alternate subtitle or sound tracks, you can create multiple
chapter lists in different languages and set the appropriate subtitle or sound track as
the owner of each chapter list. The chapter list will change to match the selected
language. Chapter 3 Editing and Authoring with QuickTime Pro 41
18 Select the text track, then select “Preload this track” (to make the chapter track load
first).
19 Deselect the new text track so that it doesn’t display on top of the video.
The new track will still function as a chapter track.
20 Save the movie as a self-contained movie.
You can now choose a chapter title from the pop-up menu to the right of the timeline.
Setting a Movie’s Poster Frame
A poster frame is a still image of a movie that represents the movie in places like the
QuickTime Player Favorites window and the Finder. The default poster frame is the first
frame in the movie. With QuickTime Pro, you can change the poster frame.
To change a movie’s poster frame:
1 In QuickTime Player, drag the playhead (or use the arrow keys to move the playhead) to
the desired frame.
2 Choose View > Set Poster Frame.
To view a movie’s poster frame, choose View > “Go to Poster Frame.”
Saving a Movie with Specific Playback Settings
With QuickTime Pro, you can specify how a movie should open and play, what happens
when the movie finishes, and the method QuickTime uses to resize the video.
To specify playback options:
1 Choose Window > Show Movie Properties.
2 Select the movie name, and then click Presentation.
3 Select the desired options.
4 Save the movie.
Changing the Movie Controller Type
With QuickTime Pro, you can specify the kind of playback controls available on the
QuickTime Player window. For a QTVR movie, for example, you can save the movie with
one of the QTVR movie controllers.
To specify a movie controller type:
1 Choose Window > Show Movie Properties.
2 Select Movie and click Presentation.
3 Choose an option from the Movie Controller Type pop-up menu.
4 Save the movie.4
42
4 Exporting Files
with QuickTime Pro
If you want more control over how QuickTime creates
a file, use the Export feature of QuickTime Pro.
With QuickTime Pro, you can export a movie to a number of different file formats, such
as QuickTime movie (MOV), MPEG-4, 3GPP, 3GPP2, AVI, and DV. In addition, you can
export an audio track to several different audio formats, export the individual frames of
a movie as separate image files, or export a text track to a text file.
To see the list of file formats available for a movie open in QuickTime Player, choose
File > Export and browse the list of file format choices in the Export pop-up menu.
About Video and Audio Compression
Because uncompressed video and audio require a lot of disk space to store and a lot of
bandwidth (the rate at which data can be transferred) to deliver, you’ll want to
compress (encode) your movie before sending it to another computer or on the web.
Movies are usually compressed (encoded) as part of the export process.Chapter 4 Exporting Files with QuickTime Pro 43
Exporting Files Using Presets
QuickTime Pro offers a myriad of settings and options for compressing video and audio
during export. To help simplify the process of compressing and exporting,
QuickTime Pro also offers export presets. Different presets are available for each file
format.
To export a movie using presets:
1 In QuickTime Player, open the movie you wish to export.
2 Choose File > Export.
3 Choose a file format from the Export pop-up menu.
4 Choose the preset that best meets your needs from the Use pop-up menu.
For example, to export a movie for use with a video-capable iPod, choose “Movie to
iPod.” To export a movie that is optimized for Apple TV, choose “Movie to Apple TV.”
You can also create movies for iPhone by choosing one of the “Movie to iPhone”
options.
5 Choose a filename and location, and click Save.
Note: To use the same settings you used during the last export, choose Most Recent
Settings from the Use pop-up menu.
Customizing Export Settings
For the greatest possible control when compressing and exporting media files, use the
export options available in QuickTime Pro.
For video compression and export, QuickTime Pro offers customizable settings in three
categories: video settings, filters (also known as special effects), and image size.
QuickTime Pro also offers many options for customizing compression settings for
sound.
The following topics provide information about which options to choose when
exporting and compressing movies.
Customizing Video Export Settings
To customize video settings for export:
1 Choose File > Export.
2 Choose a file format from the Export pop-up menu. For the options discussed below,
choose “Movie to QuickTime Movie.”
3 Click Options.44 Chapter 4 Exporting Files with QuickTime Pro
4 In the Video area of the Movie Settings dialog, click Settings, and then choose your
settings.
 Compression type: Choose the video compressor (codec) you want to use to
compress your video. For the highest quality at the lowest data rate (or the smallest
file), H.264 is recommended.
 Data rate (bit rate): In general, the higher the data rate, the better the quality, but
the bigger the file. In most cases, you’ll want to set a data rate based on the way your
movie will be viewed. For example, for streaming to Internet dialup connections, limit
the data rate to around 45 kilobits per second to leave room for network traffic. If the
file will be downloaded for playback, the data rate can be higher (a 56K modem user,
however, has longer to wait before playback begins). The data rate of a movie is also
affected by other compression options you set, such as the frame rate. To let the
compressor choose an appropriate data rate, select Automatic.
 Optimized for: Choose your intended delivery method from the “Optimized for”
pop-up menu. This setting informs the codec how much the data rate can vary
above and below the data rate you choose. This option is available only for
compressors that can apply limits, such as H.264.
 Key frame options: Many compressors use “frame differencing” to compress moving
images. Frame differencing is the process of determining what information has
changed from a starting frame (called a key frame) to subsequent frames. The key
frame contains all of the information for an image. Subsequent frames contain only
the information that has changed.
Depending on the compressor you use, you can specify how often you want key
frames to occur. If you don’t have enough key frames, the quality of your movie
might be lower because most frames are generated from others. However, more key
frames result in a larger movie with a higher data rate. With some compressors, an
additional key frame is inserted automatically if too much of the image has changed
from one frame to the next. A good rule of thumb for general use is to have one key
frame every 5 seconds (multiply the frames per second by 5). If you are creating a file
for RTSP streaming and have concerns about the reliability of the delivery network
(as with the public Internet), you may want to increase key frame frequency to one
key frame every 1 or 2 seconds. To let the compressor choose the key frame interval,
select Automatic.
 Frame rate: Frame rate is the number of individual images shown every second.
Standard (NTSC) video has a frame rate of 29.97 frames per second (fps), and the
standard for film is 24 fps. The European standard (PAL) is 25 fps. QuickTime movies
are sometimes created with a slower frame rate to reduce bandwidth and CPU
requirements.Chapter 4 Exporting Files with QuickTime Pro 45
Movies with higher frame rates show motion better but have larger file sizes. If you
choose a frame rate that’s lower than the movie’s current frame rate, frames will be
deleted. If you choose a number that’s higher than the movie’s current frame rate,
existing frames will be duplicated (not recommended, since it increases file size
without improving quality). When choosing a frame rate, use a simple fraction of
your current frame rate, such as 1/2, 1/3, and so on. For example, if your current
frame rate is 30 (29.97), use 15 or 10.
 Other options: Some compressors or codecs offer options specific to the codec.
After you select a compressor (codec), any special options appear.
Adding Special Effects and Filters to a QuickTime Movie
With QuickTime Pro, you can add special effects such as blur, emboss, and film noise to
a movie before you export it. You add special effects by using filters.
To set a filter for a movie:
1 In QuickTime Player, choose File > Export.
2 Choose “Movie to QuickTime Movie” from the Export pop-up menu.
3 Click Options, click Filter, and select the filter and settings you want to use.
The selected filter is applied to the entire movie.
Changing Image (Frame) Size
With QuickTime Pro, you can change the size of a movie’s video frame. For example, if
your movie will be viewed on a small screen (such as a mobile device), you can change
the movie’s dimensions to match the target device. You can experiment with making
the frame size smaller for a given data rate to get better encoding results.
To change the size of a movie’s video frame:
1 Choose File > Export.
2 Choose a file format from the Export pop-up menu.
3 Click Options.
4 In the Video area of the Movie Settings dialog, click Size and then choose an option:
 Use current size: This option (the default) keeps the exported movie’s image size the
same as your original source movie.
 Use custom size: When you choose this option, you can specify (in pixels) a height
and width for the exported movie’s image size. For best results, choose dimensions
smaller than your source movie, and keep the height-to-width ratio the same as the
source (so that objects don’t appear distorted).46 Chapter 4 Exporting Files with QuickTime Pro
Customizing Sound Export Settings
To customize sound settings for export:
1 Choose File > Export.
2 Choose “Movie to QuickTime Movie” from the Export pop-up menu.
3 Click Options.
4 In the Sound area of the Movie Settings dialog, click Settings and then choose your
options:
 Format: Choose the compressor (codec) you want to use for compressing sound. For
general use and Internet delivery of music, MPEG-4 Audio (AAC) is recommended.
 Channels: Choose between mono (1 channel) or stereo (2 channels).
 Rate: Digitized sound is made up of sound samples. The more samples per second,
the higher the sound quality. To maintain quality, music requires a higher sampling
rate than spoken voice because music uses a wider range of frequencies. Audio CDs
use a sampling rate of 44.1 kHz.
 Render Settings: Choose the quality of the signal processing that will be used;
higher quality settings take longer to process.
 Other options: To see any additional options specific to your chosen codec, click the
Options button. if it’s available.
Preparing Movies for Internet Delivery
With QuickTime Pro, you can create movies so that they can be delivered over the
Internet. You can deliver a movie over the Internet in two ways:
 With HTTP download, the movie is downloaded to the client’s hard disk. Fast Start is
a QuickTime feature that enables users to watch or listen to media as it is being
downloaded (long before the whole movie has been downloaded) from a standard
web server to their hard disks. Fast Start works well for short-form movies where file
size is limited. It ensures high-quality playback regardless of users’ Internet
connection speeds, although those with slower connections will wait longer before
media starts to play.
 Real-time streaming provided by QuickTime Streaming Server (QTSS) delivers media
in real time over the Internet, from modem rates to broadband. No file is ever
downloaded to a viewer’s hard disk. Media is played, but not stored, by the client
software as it is delivered. You would choose real-time streaming rather than Fast
Start for webcasts of live events in real time, delivery of long-form video, 24/7
Internet radio and TV channels, and other cases in which you don’t files stored on a
user’s hard disk. QTSS uses the RTSP protocol.Chapter 4 Exporting Files with QuickTime Pro 47
Preparing a Movie for Fast Start
With QuickTime Pro, you can set up a movie to start playing from a web server before
the movie has completely downloaded to the user’s hard disk. This is called a “Fast
Start” movie.
Set the Fast Start setting just before you distribute your movie; making other changes
and resaving may undo the Fast Start setting.
If the movie is in the format you want, you can set it up for Fast Start by choosing
File > Save As and then selecting “Save as a self-contained movie.” If the movie is not
in the format you want, you need to encode it first by following the steps below.
To convert a movie and set it up for Fast Start:
1 In QuickTime Player, choose File > Export.
2 Choose “Movie to QuickTime Movie” from the Export pop-up menu.
3 Click Options and select video and sound compression options appropriate for web
delivery.
For more information, see “Customizing Video Export Settings” on page 43,
“Customizing Sound Export Settings” on page 46, and the tutorials at
www.apple.com/quicktime/resources.
4 Make sure the “Prepare for Internet Streaming” checkbox is selected and Fast Start
appears in the pop-up menu.
Preparing a Movie for Real-Time Streaming
With QuickTime Pro, you can set up a movie to be streamed over the Internet. To do so,
you should compress the movie so that its data rate is appropriate for the bandwidth at
which your users will connect.
Hinted streaming format is for use with QuickTime Streaming Server or Darwin
Streaming Server. When you choose hinted streaming, “hint tracks” (information
needed to stream the movie) are added to the movie. If the movie is already in the
desired format, you can prepare a movie for streaming by choosing File > Export and
then choosing “Movie to Hinted Movie.” If you want to change the movie’s format,
follow the steps below.
To set up a movie for Internet streaming:
1 In QuickTime Player, choose File > Export.
2 Choose “Movie to QuickTime Movie” from the Export pop-up menu.
3 Choose a streaming option from the Use pop-up menu.
4 Click Options and select the “Prepare for Internet Streaming” checkbox.
5 Choose Hinted Streaming from the pop-up menu.48 Chapter 4 Exporting Files with QuickTime Pro
If you want to stream a QuickTime movie using QuickTime Streaming Server, you
should use a web-optimized video or audio compressor to compress the movie file. All
QuickTime compressors are compatible with QuickTime Streaming Server, but the
compressors listed here are optimized to give the best results for delivery over the
Internet. For a complete list of compressors that QuickTime supports, see the Products
area of the QuickTime website (www.apple.com/quicktime/products).
 Video compressors: H.264, MPEG-4, Sorenson Video (any version), H.263, H.261
 Audio compressors: AAC, QUALCOMM PureVoice, AMR, QDesign
For more information about preparing a movie for streaming, go to
www.apple.com/quicktime/resources.
Creating Reference Movies to Optimize Web Playback
You can use reference movies to provide the appropriate movie for different users’
connection speeds. For example, you can have a smaller movie streamed to users
connected over a standard modem, and a larger version of the movie streamed to
users connected over a broadband connection.
Apple provides a free tool, MakeRefMovie X, that greatly simplifies the process of
creating reference movies. You can download this software at:
developer.apple.com/quicktime/quicktimeintro/tools
For more information about reference movies see “Creating Movies Optimized for
iPhone and Web Delivery” on page 48
Creating Movies Optimized for iPhone and Web Delivery
With QuickTime Pro you can easily create versions of your movie that are optimized for
iPhone and desktop viewing. This saves you several steps in creating movies for online
distribution and ensures that your audience automatically receives the best viewing
experience for the device they’re using.
To export for iPhone and web delivery:
1 Choose File > Export for Web.
2 In the dialog that appears, specify a filename and select a location for the exported
movies and HTML snippet file.
3 Select the versions you want to create.
 iPhone: Creates a movie that is optimized for delivery to iPhone over a Wi-Fi
connection.
 iPhone (cellular): Creates a move that is optimized for delivery to iPhone over a
cellular (EDGE) connection.
 Desktop: Creates a movie optimized for delivery to computers over broadband
connections.Chapter 4 Exporting Files with QuickTime Pro 49
4 Choose a poster frame option for the movie.
The poster frame determines the still image viewers will see when they load the web
page with the embedded reference movie. If you want to set a new poster frame
before exporting the versions, click Cancel. Then navigate to the frame you want to use
and choose View > Set Poster Frame.
5 Click Export to create the files necessary for the options you selected.
The exporting process creates several files, including files for each version of the movie
you select, a reference movie that will automatically deliver the correct version to the
viewer, and an HTML file that contains a snippet of code you can use to embed the
movie in a web page. All of these files must be copied to your web server, in the same
location relative to each other and with the same file names, in order for the reference
movie and HTML snippet to function correctly.
Exporting MPEG-4 Files
MPEG-4 is the latest worldwide industry standard for delivering professional-quality
audio and video over a wide range of bandwidths, from mobile multimedia to high
definition. When you want to create a file that will work with another MPEG-4 device,
use QuickTime Pro to create MPEG-4 content by exporting a movie.
To export a file to the MPEG-4 format:
1 Open the movie you want to export in QuickTime Player, then choose File > Export.
2 Choose “Movie to MPEG-4” from the Export pop-up menu.
Note: To create an MPEG-4 movie that is optimized for use with Apple TV, iPhone, or
iPod, select “Movie to Apple TV” , “Movie to iPhone”, or “Movie to iPod” from the Export
pop-up menu. All of the MPEG-4 options will be set to the appropriate values for you.
To adjust settings such as file format, compression, and distribution restrictions, click
Options. The options you choose depend on the network over which you’ll deliver the
file and the viewers’ connection. The following sections describe the options in detail.
MPEG-4 Video Export Options
When you export a movie to MPEG-4 format (by choosing File > Export and then
choosing “Movie to MPEG-4”), you access the following options by clicking Options and
then clicking Video.
 File Format: To ensure operability with devices made by ISMA members, choose
“MP4 (ISMA).” For more information, go to www.isma.tv.50 Chapter 4 Exporting Files with QuickTime Pro
 Video Format: Choose the video compressor (codec) you want to use to compress
your video. For the highest quality at the lowest data rate (or the smallest file), H.264
is recommended. If you need the file to play on a device that supports MPEG-4 video,
choose MPEG-4 Basic or MPEG-4 Improved, depending on the target device. If your
source movie’s video track is already compressed, you can choose “Pass through” so
that the video doesn’t get compressed again.
 Data Rate: The more kilobits per second (kbps), the better the movie quality. For
best playback, however, don’t choose a data rate higher than the available
bandwidth.
 Optimized for: If you choose H.264 from the Video Format pop-up menu, choose
your intended delivery method from the “Optimized for” pop-up menu. This setting
tells the codec how much the data rate can vary above and below the data rate you
choose.
 Image Size: Current maintains the source material size. To choose a size not listed in
the pop-up menu, choose Custom.
 Preserve Aspect Ratio Using: If you are changing the image size, use this option to
specify an option in case the movie needs to be scaled to the new dimensions.
Letterbox will scale the source proportionally to fit into the clean aperture, adding
black bars to the top and bottom or sides as necessary. Crop centers, scales, and
trims to the clean aperture. Fit Within Dimensions adjusts to the destination size by
fitting to the longest side, scaling if necessary.
 Frame Rate: In most cases, your video will look better if you choose a number that is
exactly divisible by the FPS (frames per second) of your source. For example, if your
source is captured at 30 FPS, choose a frame rate of 10 or 15. Don’t choose a rate
larger than that of your source material.
 Key Frame: The more often you specify a key frame (the lower the number), the
better the video quality, but the bigger the file.
If you choose MP4 from the File Format pop-up menu and H.264 from the Video
Format pop-up menu, and then click Video Options, you get the following additional
options:
 Restrict Profile(s) to: If you need the file to play on a device that conforms to one or
more of the standard’s profiles, check those profiles here.
 Encoding Mode: Choose whether you want the best quality or faster encoding.
MPEG-4 Audio Export Options
When you export a movie to MPEG-4 format (by choosing File > Export and then
choosing “Movie to MPEG-4”), you access the following options by clicking Options and
then clicking Audio.
 Audio Format: Choose your audio compressor (codec) here. If your source movie has
only one audio track and it is already compressed, you can choose “Pass through” so
that the audio doesn’t get compressed again.Chapter 4 Exporting Files with QuickTime Pro 51
 Data Rate: As with video, the more kilobits per second, the better the audio quality.
 Channels: Choose between mono (1 channel) or stereo (2 channels).
 Output Sample Rate: Available only with AAC audio. It’s best to match the sample
rate to that of the target device.
 Encoding Quality: Available only with AAC audio. The Good setting is optimized for
the highest-speed encoding, for higher-quality, choose Best for 16-bit audio, or Better
if your audio source is 24-bit.
MPEG-4 Streaming Export Options
When you export a movie to MPEG-4 format (by choosing File > Export and then
choosing “Movie to MPEG-4”), you access the following options by clicking Options and
then clicking Streaming.
If you’re going to deliver the exported file using RTSP streaming, select “Enable
streaming.”
Streamed data must be sent in smaller-size packets. Some networks have limitations on
packet size and packet duration. If your network provider gives you information about
size limitations, you can change the packet size and the maximum packet duration to
comply with your delivery network. Otherwise, use the default values.
Exporting 3G Files
QuickTime Player can import and play back files for use on 3G networks—high-speed
mobile networks that enable multimedia to be sent between mobile devices.
QuickTime supports standards for nearly any kind of 3G mobile network.
To import a 3G file, choose File > Open File and then select the file. You can also open a
3G file in QuickTime by dragging it to the QuickTime icon in the Dock or doubleclicking the file (Mac OS X only).
With QuickTime Pro, you can export video, audio, and text to one of the many 3G
formats that QuickTime supports.
To export a file to the 3G format:
1 Open the movie you want to export in QuickTime Player, then choose File > Export.
2 Choose “Movie to 3G” from the Export pop-up menu.
To adjust settings such as file format, compression, and distribution restrictions, click
Options. The options you choose depend on the mobile network over which you’ll
deliver the file and the capabilities of the viewer’s phone. The following sections
describe the options in detail.52 Chapter 4 Exporting Files with QuickTime Pro
3G File Format Export Options
After you choose File > Export and click Options, the first two items in the File Format
pop-up menu are the standard formats.
 3GPP is for GSM networks. With this format, you can use:
 MPEG-4, H.263, or H.264 video
 AAC or AMR audio
 3G timed text
 3GPP2 is for CDMA 2000 networks. With this format, you can use:
 MPEG-4, H.263, or H.264 video
 AAC, AMR, or QCELP audio
 3G timed text
 Movie fragments (enables playback to start sooner for longer movies, since only
the fragment, not the whole movie, must fit on the handset)
The remaining formats are provided for specific networks. With these formats, you can
restrict distribution so that a file can’t be shared from the recipient’s phone (set this
option in the Advanced pane). These formats may limit the acceptable file size or data
rate; check with the service provider for more information.
 3GPP (Mobile MP4) is for NTT DoCoMo’s i-motion 3G service. With this format, you
can use the 3GPP options described above.
 3GPP2 (EZmovie) is for KDDI’s 3G network service. This format provides the same
options as 3GPP2 (described above), except for AMR audio support.
 AMC (EZmovie) is for KDDI subscribers with AMC-capable phones. With this format,
you can use:
 MPEG-4 video
 QCELP audio
 KDDI’s text format
3G Video Export Options
 Video Format: If your source movie has only one video track and it is already
compressed, you can choose “Pass through” (so that the video doesn’t get
compressed again).
 Data Rate: The more kilobits per second (kbps), the better the movie quality. For
best playback, however, don’t choose a data rate higher than the available
bandwidth.
 Optimized for: If you choose H.264 from the Video Format pop-up menu, choose
your intended delivery method from the “Optimized for” pop-up menu. This setting
tells the codec how much the data rate can vary above and below the data rate you
choose.Chapter 4 Exporting Files with QuickTime Pro 53
 Image Size: If you’re sending the file to a mobile phone, choose one of the
standards. Current maintains the source material size; the resulting file may not play
on a mobile phone. To choose a size not listed in the pop-up menu, choose Custom.
 Preserve Aspect Ratio Using: If you are changing the image size, use this option to
specify an option in case the movie needs to be scaled to the new dimensions.
Letterbox will scale the source proportionally to fit into the clean aperture, adding
black bars to the top and bottom or sides as necessary. Crop centers, scales, and
trims to the clean aperture. Fit Within Dimensions adjusts to the destination size by
fitting to the longest side, scaling if necessary.
 Frame Rate: In most cases, your video will look better if you choose a number that is
exactly divisible by the FPS (frames per second) of your source. For example, if your
source is captured at 30 FPS, choose a frame rate of 10 or 15. Don’t choose a rate
larger than that of your source material.
 Key Frame: The more often you specify a key frame (the lower the number), the
better the video quality, but the bigger the file.
These additional options are available when you click Video Options:
 Re-sync markers: Adds re-sync markers inside the video frames to help with packet
loss recovery when streaming.
 Encoding Mode: With H.264 video, you can speed up the compression process (for
preview purposes, for example) by choosing “Faster encode (Single-pass).” With the
default option, “Best quality (Multi-pass),” the codec determines how many passes
are needed to compress the data for the best quality.
3G Audio Export Options
When you export a movie to 3G format (by choosing File > Export and then choosing
“Movie to 3G”), you access the following options by clicking Options and then clicking
Audio.
 Audio Format: If your source movie has only one audio track and it is already
compressed, you can choose “Pass through” (so that the audio doesn’t get
compressed again).
 Data Rate: As with video, the more kilobits per second, the better the audio quality.
 Channels: Choose between mono (1 channel) or stereo (2 channels).
 Frames per sample: Available only with AMR audio, this option enables exported
audio data to be packed more efficiently.
 Silence detection: Available only with AMR audio, this option detects audio portions
with low signal levels and adjusts the data rate of the output accordingly.
 Output Sample Rate: Available only with AAC audio. It’s best to match the sample
rate to that of the target device.
 Encoding Quality: Available only with AAC audio. By choosing Best, you can get
higher-quality audio but it takes longer to encode.54 Chapter 4 Exporting Files with QuickTime Pro
3G Text Options
When you export a movie to 3G format (by choosing File > Export and then choosing
“Movie to 3G”), you access the following options by clicking Options and then clicking
Text.
These options are available if your movie has a text track (credits, titles, subtitles, and so
on).
Some mobile devices can’t play text in a movie. To allow the movie to play only if the
text can be displayed on the receiving device, select “Require text capability on
handset.” Deselect this checkbox to allow the audio and video to play even if the text
can’t be displayed on the device.
3G Streaming Options
When you export a movie to 3G format (by choosing File > Export and then choosing
“Movie to 3G”), you access the following options by clicking Options and then clicking
Streaming.
To create a file for RTSP streaming to QuickTime Player, select “Enable streaming.” This
option creates a hint track (instructions necessary for streaming a file).
“Optimize for server” helps the server to process the file faster, but increases the file
size.
3G Advanced Options
When you export a movie to 3G format (by choosing File > Export and then choosing
“Movie to 3G”), you access the following options by clicking Options and then clicking
Advanced.
If your file is in Mobile MP4 or EZmovie format, you can restrict distribution so that
once the file is on a handset it can’t be sent or copied anywhere else. You can specify
how many times the file can play back on the handset once downloaded, or make the
file expire after a certain number of days or on a certain date.
“Fragment movie” enables the file to download via HTTP in small pieces so that
playback can start faster and so that larger files can be played on the handset (only the
fragment, not the entire movie, must fit on the handset at one time). 55
Appendix
Shortcuts and Tips
Learn keyboard shortcuts and other tips for using
QuickTime efficiently.
QuickTime Player Keyboard Shortcuts
QuickTime Player and QuickTime Pro provide keyboard shortcuts for most playback
options. When available, each of these shortcuts appears to the right of its associated
menu item. A few keyboard shortcuts have no menu equivalents.
For this control Press
Play/pause Space bar
Play or pause all movies Command-Return
Play movie backward Shift–double-click, Command–Left Arrow
Stop playback and go back one frame Left Arrow
Stop playback and go forward one frame Right Arrow
Go to beginning of selection or movie Option–Left Arrow
Go to end of selection or movie Option–Right Arrow
Turn volume up Up Arrow
Turn volume down Down Arrow
Turn volume up to maximum level Option–Up Arrow
Turn volume down to minimum level Option–Down Arrow56 Appendix Shortcuts and Tips
QuickTime Pro Keyboard Shortcuts
For this control Press (Mac OS X) Press (Windows)
Play/pause Space bar Space bar
Play or pause all movies Command-Return Control-Enter
Play movie backward Shift–double-click
Command–Left Arrow
Shift–double-click
Stop playback and go back one
frame
Left Arrow Left Arrow
Stop playback and go forward
one frame
Right Arrow Right Arrow
Go to beginning of selection or
movie
Option–Left Arrow Control–Left Arrow
Go to end of selection or movie Option–Right Arrow Control–Right Arrow
Turn volume up Up Arrow Up Arrow
Turn volume down Down Arrow Down Arrow
Turn volume up to maximum
level
Option–Up Arrow Control–Up Arrow
Turn volume down to minimum
level
Option–Down Arrow Control–Down Arrow
To do this... Press
Enter full-screen mode Command-F
Exit full-screen mode Command-period or Esc
Play movie at half size Command-0
Play movie at normal size Command-1
Play movie at double size Command-2
Play movie at full size Command-3
Move In marker to playhead location I
Move Out marker to playhead location O
Extend selection to the left Option–Shift–Left Arrow
Extend selection to the right Option–Shift–Right Arrow
Extend selection to point clicked in LCD Shift-clickAppendix Shortcuts and Tips 57
Automating QuickTime Player with AppleScript
In Mac OS X, you can use AppleScript to automate QuickTime Player functions. For
example, you can open a movie and tell it to play for a specific duration; automate the
conversion of movies from one format to another; adjust track playback properties
such as start time, volume, and layer; or adjust movie properties such as copyright and
author.
To determine all of the AppleScript commands you can use to control QuickTime
Player, install AppleScript and look at the QuickTime Player AppleScript dictionary.
1 Open Script Editor.
2 Choose File > Open Dictionary.
3 Select QuickTime Player.
Sample QuickTime Player scripts can be found on the AppleScript website
(www.apple.com/applescript/quicktime).
To do this Press (Mac OS X) Press (Windows)
Enter full-screen mode Command-F Control-F
Exit full-screen mode Command-period or Esc Control-period or Esc
Play movie at half size Command-0 Control-0
Play movie at normal size Command-1 Control-1
Play movie at double size Command-2 Control-2
Play movie at full size Command-3 Control-3
Move In marker to playhead
location
I I
Move Out marker to playhead
location
O O
Extend selection to the left Option–Shift–Left Arrow
Extend selection to the right Option–Shift–
Right Arrow
Extend selection to point clicked
in LCD
Shift-click58 Appendix Shortcuts and Tips
Automating QuickTime Player on Windows
In Windows, you can use JavaScript, Visual Basic, or other Active Scripting languages to
automate QuickTime Player functions. As with AppleScript on Mac OS X, you can
control movie playback, convert movies from one format to another, adjust movie and
track properties, and more.
There are three QuickTime Player objects available for use:
 QuickTimePlayerApp
The application object. This object has a Players property which returns a collection
of the QuickTime Player windows. The Quit method exits the program.
 QuickTimePlayers
Use this object to enumerate player windows; the Remove and Add methods permit
the removal and creation of new QuickTime Player windows.
 QuickTimePlayer
This object has properties and methods to open movies, control the window’s
position and appearance, and to interact with its menus. The QTControl property
returns the ActiveX control hosting the window’s movie.
To examine the QuickTime Player or QuickTime Control interfaces in detail, look at the
Apple QuickTime Player Library 1.0 or Apple QuickTime Control 2.0 interfaces in a COM
object browser. 59
Glossary
Glossary
AIFF (Audio Interchange File Format) An audio file format used widely on the web.
aspect ratio The relationship between the height and width of an image.
audio channel Audio tracks can contain one or more channels of audio data. Each
channel represents the sound directed to a particular speaker. For instance, stereo
tracks contain two audio channels.
audio channel label Each audio channel may be labeled to specify where its sound
should be directed. In a stereo track, the channels are typically labeled Left and Right.
In a 5.1 surround sound track, there are labels for Left, Right, Center, Left Surround,
Right Surround, and LFE Screen (the subwoofer).
bandwidth The capacity of a network connection, measured in bits or bytes per
second (bps or Bps), for carrying data.
BMP A bitmapped graphics format used for still images in the Windows environment.
bitmapped Represented by pixels.
chapter list A list of “locations” in a movie. A user can choose an item from the chapter
list to go to that point in the movie.
codec From “compressor/decompressor.” A codec is technology for compressing and
decompressing data. Codecs can be implemented in software, hardware, or a
combination of the two. Codecs can by “lossy” or “lossless,” depending on whether data
is lost during compression.
compression The process of reducing the data size of a file.
Darwin Streaming Server A technology for delivering media over the Internet in real
time. Based on the same code as Apple’s QuickTime Streaming Server (QTSS), Darwin
Streaming Server is an open-source streaming server.60 Glossary
Fast Start A method of delivering a movie so that it can start playing before it is fully
downloaded.
frame A single image in a movie.
frame rate The number of frames displayed per second.
GIF (Graphics Interchange Format) A file format for images.
hint track In a streamed movie, a hint track specifies for the server how the movie’s
content is to be transmitted.
hot spot A place in a virtual reality movie where the user can interact with the movie
using the mouse.
Instant-On A technology that dramatically improves access to streaming content for
broadband users.
JPEG (Joint Photographic Experts Group) A standard for compressing still images.
layer In QuickTime movies, how an image is displayed depends on its layer; images
with lower layer numbers are displayed on top.
MIDI (Musical Instrument Digital Interface) A software and hardware standard set by
the music industry that enables electronic instruments to communicate with one
another and with computers.
MP3 (MPEG-1 layer 3) A format for compressing music.
MPEG-4 An ISO standard based on the QuickTime file format that defines multimedia
file and compression formats.
node In QuickTime VR, a point from which an object or panorama can be viewed.
NTSC (National Television System Committee) The organization that defines North
American broadcast standards. The term NTSC video also refers to the video standard
defined by the committee, which is 29.97 fps, 525 lines per frame, and interlaced.
PAL (Phase Alternation by Line) A video format used by many European countries and
other countries outside North America. The PAL standard is 25 fps, 625 lines per frame,
and interlaced.
PICT A Mac OS picture file format that does not apply compression to an image and
therefore maintains the same quality level from copy to copy.
pixel The onscreen dots that form text and graphics. A contraction of the words picture
and element.
plug-in Software that helps a web browser interpret certain types of media files.Glossary 61
PNG (Portable Network Graphics) A file format for images.
poster In QuickTime, a still image, usually a single frame from a movie, used to
represent the movie to users.
protocol A set of standards for sending and receiving information on a network.
QTSS (QuickTime Streaming Server) A technology used to deliver media over the
Internet in real time.
QuickTime Player An application that opens and plays QuickTime movies, as well as
many other kinds of files.
QuickTime Pro A version of QuickTime Player with advanced features, primarily the
addition of editing capabilities.
QuickTime VR A QuickTime media type with which users can interact with threedimensional places and objects.
reference movie A file that contains the location of one or more media files. A
reference file linked from a webpage, for example, can direct a QuickTime Player to the
version encoded for a particular connection speed.
RGB Red, green, blue; a way of representing colors onscreen.
RTSP (Real-Time Streaming Protocol) A protocol for controlling a stream of real-time
multimedia content. Sources of data can include both live feeds and stored digital
video.
sprite An image that is defined once and is then animated by commands that change
its position or appearance.
streaming Delivery of video or audio data over a network in real time, in packets
instead of in a single file download.
TIFF (Tagged Image File Format) A format for graphics, commonly used to transfer
bitmapped images between applications.
track A single data type in a QuickTime movie. A movie may contain one or more
tracks.
tween track A track that modifies the display of other tracks.
virtual reality (VR) The effect achieved by QuickTime VR, where users can manipulate
objects or environments.
wav A Windows format for sound files.Index
62
Index
3G files
exporting 51–53
A
A/V Controls 18
animations 27
annotations 38
AppleScript 57
audio
adding an audio track 33
audio controls 18, 34
B
balance
changing for an audio track 34
balance controls 18
bass level 18, 34
bit rate. See data rate
browser
playing movies in a 12
C
Cache checkbox 25
chapter lists 12, 39
color
changing a movie’s border 24
compressing audio and video 42–53
connection speed 14
content guide 19
converting files to QuickTime 28
copy-protected movies 17
cropping movies 31
D
data rate 14, 44, 47, 50, 52
dimensions of a movie
changing 20, 45
determining 35
disk cache 13
displays
using more than one 23
E
editing QuickTime movies 30–39
email
sharing movies via 29
Empty Download Cache checkbox 13
“Enable kiosk mode” checkbox 22
Encoding Mode 53
equalizer 11, 19
exporting movies 42–53
F
Fast Start 47
Favorites 17
file formats 9
filters (special effects) 45
firewalls 14
frame rate 18, 27, 44, 50, 53
full-screen mode 19
H
help
getting additional 10
onscreen 10
hinting 47
HomePage 29
HTTP 14
I
importing files 9
Instant-On streaming 14
Internet
connection speed 14
preparing movies for delivery over the 46–48
saving movies from the 27
sharing movies via the 29
J
jog shuttle 18
K
keyboard shortcuts 55
key frame options 44
L
languages 37
Layer control 34Index 63
locked media files 17
looping 20
M
media keys 17
memory options 25
MIDI 16
MIME Settings 15
Mirror Displays 23
monitors. See displays
movie controller 41
Movie Download Cache Size slider 13
MPEG-4 files
exporting 49–51
Multi-pass mode 53
Mute checkbox 32, 34
N
new features in QuickTime 7 7
O
Open Image Sequence command 27
opening files 9, 11
opening files automatically 18
opening more than one movie at a time 20
Open Recent command 17
P
pass through 53
pasting items into a movie 35
playback options 13, 18, 41
playhead 11
playing movies 11
playing sound 19
“Play movies automatically” checkbox 13
poster frames 41
Preferences 18
“Preload this track” checkbox 25, 41
Preview application 16
protocols 14
Q
QuickTime Player Preferences 18
QuickTime plug-in 12
QuickTime Pro
defined 6
getting 23
QuickTime Streaming 47
QuickTime VR movies 15
QuickTime website 13
R
recording audio and video 25
reference movies 13, 26, 27, 48
repeating a movie 20
resizing a movie 38
rotating a movie 38
RTSP 14
S
“Save movies in disk cache” checkbox 13
saving a movie 27
secured media files 17
selecting part of a movie 30
self-contained movies 26
sharing movies 29
Show Movie Info command 18
Single-pass mode 53
size
changing movie 20, 45
slideshow
creating from still images 27
slideshows 24, 27
Solo checkbox 32, 34
special effects 45
still images
converting to slideshow 27
exporting frames from a QuickTime movie 28
viewing and modifying 16
streaming 47
subtitles 22
system requirements 9
T
technical support 10
text
adding a text track 35
finding 22
overlaying a movie with text 36
specifying font styles 36
titles 22
tracks 32–37
adding an audio track 33
adding a text track 35
disabling 32
transparency 39
treble level 18, 34
Trim to Selection 31
V
versions
getting new versions of QuickTime 10
video frame
changing the size of 45
video masks 39
virtual reality movies 15
volume 11, 34
adjusting during playback 12
changing sound track volume 34
W
web. See Internet
Event Handling Guide
for iOSContents
About Events in iOS 6
At a Glance 6
An Application Receives Multitouch Events When Users Touch its Views 6
An Application Receives Motion Events When Users Move the Device 7
Remote-Control Events Are Sent When Users Manipulate Multimedia Controls 7
How to Use this Book 7
See Also 8
Event Types and Delivery 9
UIKit Event Objects and Types 9
Event Delivery 11
Responder Objects and the Responder Chain 11
Motion Event Types 14
Multitouch Events 16
Events and Touches 17
Approaches for Handling Touch Events 18
Regulating Touch Event Delivery 19
Handling Multitouch Events 20
The Event-Handling Methods 20
Basics of Touch-Event Handling 21
Handling Tap Gestures 24
Handling Swipe and Drag Gestures 27
Handling a Complex Multitouch Sequence 29
Hit-Testing 33
Forwarding Touch Events 35
Handling Events in Subclasses of UIKit Views and Controls 37
Best Practices for Handling Multitouch Events 37
Gesture Recognizers 39
Gesture Recognizers Simplify Event Handling 39
Recognized Gestures 39
Gestures Recognizers Are Attached to a View 40
Gestures Trigger Action Messages 41
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
2Discrete Gestures and Continuous Gestures 41
Implementing Gesture Recognition 42
Preparing a Gesture Recognizer 43
Responding to Gestures 44
Interacting with Other Gesture Recognizers 46
Requiring a Gesture Recognizer to Fail 46
Preventing Gesture Recognizers from Analyzing Touches 47
Permitting Simultaneous Gesture Recognition 48
Regulating the Delivery of Touches to Views 48
Default Touch-Event Delivery 48
Affecting the Delivery of Touches to Views 49
Creating Custom Gesture Recognizers 50
State Transitions 50
Implementing a Custom Gesture Recognizer 52
Motion Events 56
Shaking-Motion Events 56
Getting the Current Device Orientation 58
Setting Required Hardware Capabilities for Accelerometer and Gyroscope Events 59
Accessing Accelerometer Events Using UIAccelerometer 59
Choosing an Appropriate Update Interval 61
Isolating the Gravity Component from Acceleration Data 61
Isolating Instantaneous Motion from Acceleration Data 62
Core Motion 63
Handling Accelerometer Events Using Core Motion 65
Handling Rotation-Rate Data 68
Handling Processed Device-Motion Data 72
Remote Control of Multimedia 76
Preparing Your Application for Remote-Control Events 76
Handling Remote-Control Events 77
Document Revision History 79
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
3
ContentsFigures, Tables, and Listings
Event Types and Delivery 9
Figure 1-1 The responder chain in iOS 13
Listing 1-1 Event-type and event-subtype constants 9
Multitouch Events 16
Figure 2-1 A multitouch sequence and touch phases 17
Figure 2-2 Relationship of a UIEvent object and its UITouch objects 18
Figure 2-3 All touches for a given touch event 22
Figure 2-4 All touches belonging to a specific window 22
Figure 2-5 All touches belonging to a specific view 23
Listing 2-1 Detecting a double-tap gesture 24
Listing 2-2 Handling a single-tap gesture and a double-tap gesture 25
Listing 2-3 Tracking a swipe gesture in a view 27
Listing 2-4 Dragging a view using a single touch 28
Listing 2-5 Storing the beginning locations of multiple touches 30
Listing 2-6 Retrieving the initial locations of touch objects 30
Listing 2-7 Handling a complex multitouch sequence 31
Listing 2-8 Determining when the last touch in a multitouch sequence has ended 33
Listing 2-9 Calling hitTest: on a view’s CALayer object 34
Listing 2-10 Overriding hitTest:withEvent: 34
Listing 2-11 Forwarding touch events to “helper” responder objects 35
Gesture Recognizers 39
Figure 3-1 Path of touch objects when gesture recognizer is attached to a view 41
Figure 3-2 Discrete versus continuous gestures 42
Figure 3-3 Possible state transitions for gesture recognizers 51
Table 3-1 Gestures recognized by the gesture-recognizer classes of the UIKit framework 40
Listing 3-1 Creating and initializing discrete and continuous gesture recognizers 43
Listing 3-2 Handling pinch, pan, and double-tap gestures 44
Listing 3-3 Implementation of a “checkmark” gesture recognizer. 53
Listing 3-4 Resetting a gesture recognizer 55
Motion Events 56
Figure 4-1 Core Motion classes 64
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
4Figure 4-2 Right-hand rule 71
Table 4-1 Common update intervals for acceleration events 61
Listing 4-1 Becoming first responder 56
Listing 4-2 Handling a motion event 57
Listing 4-3 Configuring the accelerometer 60
Listing 4-4 Receiving an accelerometer event 60
Listing 4-5 Isolating the effects of gravity from accelerometer data 62
Listing 4-6 Getting the instantaneous portion of movement from accelerometer data 62
Listing 4-7 Configuring the motion manager and starting updates 66
Listing 4-8 Sampling and filtering accelerometer data 67
Listing 4-9 Creating the CMMotionManager object and setting up for gyroscope updates 70
Listing 4-10 Starting and stopping gyroscope updates 71
Listing 4-11 Starting and stopping device-motion updates 73
Listing 4-12 Getting the change in attitude prior to rendering 74
Remote Control of Multimedia 76
Listing 5-1 Preparing to receive remote-control events 76
Listing 5-2 Ending the receipt of remote-control events 77
Listing 5-3 Handling remote-control events 77
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
5
Figures, Tables, and ListingsEvents are objects sent to an application to inform it of user actions. In iOS, events can take many forms:
multitouch events, motion events—for example, from device accelerometers—and events for controlling
multimedia. (This last type of event is known as a remote-control event because it originates from a headset
or other external accessory.)
Multitouch events
Remote-control events
Accelerometer events
anApp
The UIKit and Core Motion frameworks are responsible for event propagation and delivery in iOS.
At a Glance
An Application Receives Multitouch Events When Users Touch its Views
The Multi-Touch interface of iPhones, iPads, and iPod touches generates low-level events when users touch
views of an application. The application sends these events (as UIEvent objects) to the view on which the
touches occurred. That view typically analyzes the touches represented by each event object and responds in
an appropriate manner.
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
6
About Events in iOSApplications are frequently interested in interpreting the touches a user makes as a common gesture, such as
a tap or swipe gesture. These applications can make use of UIKit classes called gesture recognizers, each of
which is designed to recognize a specific gesture.
Relevant Chapters:: “Event Types and Delivery” (page 9), “Multitouch Events” (page 16), “Gesture
Recognizers” (page 39)
An Application Receives Motion Events When Users Move the Device
Motion events come in different forms, and you can handle them using different frameworks. When users
shake the device, the UIKit delivers a UIEvent object to an application; these shaking-motion events are
gestures often used to trigger undo and redo actions. If you want your application to receive high-rate, continuous
accelerometer and gyroscope data, use the Core Motion framework. (Only certain devices have a gyroscope.)
You may also use the UIAccelerometer class to receive and handle accelerometer data.
Relevant Chapters:: “Event Types and Delivery” (page 9), “Motion Events” (page 56)
Remote-Control Events Are Sent When Users Manipulate Multimedia Controls
By conforming to an Apple-provide specification, headsets and other external accessories can send (via the
UIKit framework) remote-control events to an application capable of playing audio or video. The view hosting
the multimedia can receive the events and thereby control the audio video according to the user’s command
(for example, pausing or fast-forwarding).
Relevant Chapters:: “Event Types and Delivery” (page 9), “Remote Control of Multimedia” (page
76)
How to Use this Book
Regardless of the type of event you’re interested in, you should first read “Event Types and Delivery” (page
9). This chapter provides essential background information.
About Events in iOS
How to Use this Book
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
7See Also
Some iPhones and other devices have GPS and compass hardware that also generate low-level data delivered
to an application for processing. Location Awareness Programming Guide discusses how to receive and handle
this data.
Many sample code projects in the iOS Reference Library have code that illustrates the handling of multitouch
events and the use of gesture recognizers. Among these are the following projects: Touches, CopyPasteTile ,
and SimpleGestureRecognizers.
About Events in iOS
See Also
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
8An iPhone, iPad, or iPod touch device has multiple items of hardware that generate streams of input data an
application can access. The Multi-Touch technology enables the direct manipulation of views, including the
virtual keyboard. Three accelerometers measure acceleration along the three spatial axes. A gyroscope (only
on some device models) measures the rate of rotation around the three axes. The Global Positioning System
(GPS) and compass provide measurements of location and orientation. Each of these hardware systems, as
they detect touches, device movements, and location changes, produce raw data that is passed to system
frameworks. The frameworks package the data and deliver them as events to an application for processing.
The following sections identify these frameworks and describe how events are packaged and delivered to
applications for handling.
Note: This document describes touch events, motion events, and remote control events only. For
information on handling GPS and magnetometer (compass) data, see Location Awareness
Programming Guide .
UIKit Event Objects and Types
An event is an object that represents a user action detected by hardware on the device and conveyed to
iOS—for example, a finger touching the screen or hand shaking the device. Many events are instances of the
UIEvent class of the UIKit framework. A UIEvent object may encapsulate state related to the user event,such
asthe associated touches. It also recordsthe moment the event was generated. As a user action takes place—for
example, as fingers touch the screen and move across its surface—the operating system continually sends
event objects to an application for handling.
UIKit currently recognizes three types of events: touch events, “shaking” motion events, and remote-control
events. The UIEvent class declares the enum constants shown in Listing 1-1.
Listing 1-1 Event-type and event-subtype constants
typedef enum {
UIEventTypeTouches,
UIEventTypeMotion,
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
9
Event Types and DeliveryUIEventTypeRemoteControl,
} UIEventType;
typedef enum {
UIEventSubtypeNone = 0,
UIEventSubtypeMotionShake = 1,
UIEventSubtypeRemoteControlPlay = 100,
UIEventSubtypeRemoteControlPause = 101,
UIEventSubtypeRemoteControlStop = 102,
UIEventSubtypeRemoteControlTogglePlayPause = 103,
UIEventSubtypeRemoteControlNextTrack = 104,
UIEventSubtypeRemoteControlPreviousTrack = 105,
UIEventSubtypeRemoteControlBeginSeekingBackward = 106,
UIEventSubtypeRemoteControlEndSeekingBackward = 107,
UIEventSubtypeRemoteControlBeginSeekingForward = 108,
UIEventSubtypeRemoteControlEndSeekingForward = 109,
} UIEventSubtype;
Each event has one of these event type and subtype constants associated with it, which you can accessthrough
the type and subtype properties of UIEvent. The event type includes touch events, motion events, and
remote control events. In iOS 3.0, there is a shake-motion subtype (UIEventSubtypeMotionShake) and
many remote-control subtypes; touch events always have a subtype of UIEventSubtypeNone.
A remote-control event originates as commands from the system transport controls or an external accessory
conforming to an Apple-provided specification, such as a headset. They are intended to allow users to control
multimedia content using those controls and external accessories. Remote-control events are new with iOS
4.0 and are described in detail in “Remote Control of Multimedia” (page 76).
You should never retain a UIEvent object in your code. If you need to preserve the current state of an event
object for later evaluation, you should copy and store those bits of state in an appropriate manner (using an
instance variable or a dictionary object, for example).
A device running iOS can send other types of events, broadly considered, to an application for handling. These
events are not UIEvent objects, but still encapsulate a measurement of some hardware-generated values.
“Motion Event Types” (page 14) discusses these other events.
Event Types and Delivery
UIKit Event Objects and Types
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
10Event Delivery
The delivery of an event to an object for handling occurs along a specific path. As described in “Preparing Your
Application for Remote-Control Events” (page 76), when users touch the screen of a device, iOS recognizes
the set of touches and packages them in a UIEvent object that it places in the active application’s event queue.
If the system interprets the shaking of the device as a motion event, an event object representing that event
is also placed in the application’s event queue. The singleton UIApplication object managing the application
takes an event from the top of the queue and dispatches it for handling. Typically, it sends the event to the
application’s key window—the window currently the focusfor user events—and the window object representing
that window sends the event to an initial object for handling. That object is different for touch events and
motion events.
● Touch events. The window object uses hit-testing and the responder chain to find the view to receive the
touch event. In hit-testing, a window calls hitTest:withEvent: on the top-most view of the view
hierarchy; this method proceeds by recursively calling pointInside:withEvent: on each view in the
view hierarchy that returns YES, proceeding down the hierarchy until it finds the subview within whose
bounds the touch took place. That view becomes the hit-test view.
If the hit-test view cannot handle the event, the event travels up the responder chain as described in
“Responder Objects and the Responder Chain” (page 11) until the system finds a view that can handle it.
A touch object (described in “Events and Touches” (page 17)) is associated with its hit-test view for its
lifetime, even if the touch represented by the object subsequently moves outside the view.
“Hit-Testing” (page 33) discusses some of the programmatic implications of hit-testing.
● Motion and remote-control events. The window object sends each shaking-motion or remote-control
event to the first responder for handling. (The first responder is described in “Responder Objects and the
Responder Chain.”
Although the hit-test view and the first responder are often the same view object, they do not have to be the
same.
The UIApplication object and each UIWindow object dispatches eventsin the sendEvent: method. (These
classes declare a method with the same signature). Because these methods are funnel pointsfor events coming
into an application, you can subclass UIApplication or UIWindow and override the sendEvent: method
to monitor events (which is something few applications would need to do). If you override these methods, be
sure to call the superclass implementation (that is, [super sendEvent:theEvent]); never tamper with the
distribution of events.
Responder Objects and the Responder Chain
The preceding discussion mentions the concept of responders. What is a responder object and how does it fit
into the architecture for event delivery?
Event Types and Delivery
Event Delivery
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
11A responder object is an object that can respond to events and handle them. UIResponder is the base class
for all responder objects, also known as, simply, responders. It defines the programmatic interface not only for
event handling but for common responder behavior. UIApplication, UIView, and all UIKit classes that
descend from UIView (including UIWindow) inherit directly or indirectly from UIResponder, and thus their
instances are responder objects.
The first responder is the responder object in an application (usually a UIView object) that is designated to
be the first recipient of events other than touch events. A UIWindow object sends the first responder these
events in messages, giving it the first shot at handling them. To receive these messages, the responder object
must implement canBecomeFirstResponder to return YES; it must also receive a becomeFirstResponder
message (which it can invoke on itself). The first responder isthe first view in a window to receive the following
type of events and messages:
● Motion events—via calls to the UIResponder motion-handling methods described in “Shaking-Motion
Events” (page 56)
● Remote-control events—via calls to the UIResponder method remoteControlReceivedWithEvent:
● Action messages—sent when the user manipulates a control (such as a button or slider) and no target is
specified for the action message
● Editing-menu messages—sent when userstap the commands of the editing menu (described in “Displaying
and Managing the Edit Menu”)
The first responder also plays a role in text editing. A text view or text field that is the focus of editing is made
the first responder, which causes the virtual keyboard to appear.
Note: Applications must explicitly set a first responder to handle motion events, action messages,
and editing-menu messages; UIKit automatically sets the text field or text view a user taps to be the
first responder.
If the first responder or the hit-test view doesn’t handle an event, UIKit may pass the event (via message) to
the next responder in the responder chain to see if it can handle it.
The responder chain is a linked series of responder objects along which an event, action message, or
editing-menu message is passed. It allows responder objects to transfer responsibility for handling an event
to other, higher-level objects. An event proceeds up the responder chain as the application looks for an object
Event Types and Delivery
Event Delivery
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
12capable of handling the event. Because the hit-test view is also a responder object, an application may also
take advantage of the responder chain when handing touch events. The responder chain consists of a series
of next responders (each returned by the nextResponder method) in the sequence depicted in Figure 1-1.
Figure 1-1 The responder chain in iOS
superview
window
View
View
View
UIApplication
View controller
Window
superview
When the system delivers a touch event, it first sends it to a specific view. For touch events, that view is the
one returned by hitTest:withEvent:; for “shaking”-motion events, remote-control events, action messages,
and editing-menu messages, that view is the first responder. If the initial view doesn’t handle the event, it
travels up the responder chain along a particular path:
1. The hit-test view or first responder passes the event or message to its view controller if it has one; if the
view doesn’t have a view controller, it passes the event or message to its superview.
2. If a view or its view controller cannot handle the event or message, it passes it to the superview of the view.
3. Each subsequentsuperview in the hierarchy followsthe pattern described in the first two stepsif it cannot
handle the event or message.
4. The topmost view in the view hierarchy, if it doesn’t handle the event or message, passes it to the window
object for handling.
5. The UIWindow object, if it doesn’t handle the event or message, passesit to the singleton application object.
If the application object cannot handle the event or message, it discards it.
If you implement a custom view to handle “shaking”-motion events, remote-control events, action messages,
or editing-menu messages, you should not forward the event or message to nextResponder directly to send
it up the responder chain. Instead invoke the superclass implementation of the current event-handling
method—let UIKit handle the traversal of the responder chain.
Event Types and Delivery
Event Delivery
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
13Motion Event Types
Motion events come from two hardware sources on a device: the three accelerometers and the gyroscope,
which is available only some devices. An accelerometer measures changes in velocity over time along a given
linear path. The combination of accelerometers lets you detect movement of the device in any direction. You
can use this data to track both sudden movements in the device and the device’s current orientation relative
to gravity. A gyroscope measures the rate of rotation around each of the three axes. (Although there are three
accelerometers, one for each axis, the remainder of this document refers to them as a single entity.)
The Core Motion framework is primarily responsible for accessing raw accelerometer and gyroscope data and
feeding that data to an application for handling. In addition, Core Motion processes combined accelerometer
and gyroscope data using special algorithms and presents that refined motion data to applications. Motion
eventsfrom Core Motion are represented by three data objects, each encapsulating one or more measurements:
● A CMAccelerometerData object encapsulates a structure that captures the acceleration along each of
the spatial axes.
● A CMGyroData object encapsulates a structure that captures the rate of rotation around each of the three
spatial axes.
● A CMDeviceMotion object encapsulates several different measurements, including attitude and more
useful measurements of rotation rate and acceleration.
Core Motion is apart from UIKit architectures and conventions. There is no connection with the UIEvent model
and there is no notion of first responder or responder chain. It delivers motion events directly to applications that
request them.
The CMMotionManager class is the central access point for Core Motion. You create an instance of the class,
specify an update interval (either explicitly or implicitly), request that updates start, and handle the motion
events as they are delivered. “Core Motion” (page 63) describes this procedure in full detail.
An alternative to Core Motion, at least for accessing accelerometer data, is the UIAccelerometer class of the
UIKit framework. When you use this class, accelerometer events are delivered as UIAcceleration objects.
Although UIAccelerometer is part of UIKit, it is also separate from the UIEvent and responder-chain
architectures. See “Accessing Accelerometer Events Using UIAccelerometer” (page 59) for information on using
the UIKit facilities.
Event Types and Delivery
Motion Event Types
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
14Notes: The UIAccelerometer and UIAcceleration classes will be deprecated in a future release,
so if your application handles accelerometer events, it should transition to the Core Motion API.
In iOS 3.0 and later, if you are trying to detect specific types of motion as gestures—specifically
shaking motions—you should consider handling motion events (UIEventTypeMotion) instead of
using the accelerometer interfaces. If you want to receive and handle high-rate, continuous motion
data, you should instead use the Core Motion accelerometer API. Motion events are described in
“Shaking-Motion Events” (page 56).
Event Types and Delivery
Motion Event Types
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
15Note: This chapter contains information that used to be in iOS App Programming Guide . The
information in this chapter has not been updated specifically for iOS 4.0.
Touch events in iOS are based on a Multi-Touch model. Instead of using a mouse and a keyboard, users touch
the screen of the device to manipulate objects, enter data, and otherwise convey their intentions. iOS recognizes
one or more fingers touching the screen as part of a multitouch sequence . This sequence begins when the first
finger touches down on the screen and ends when the last finger is lifted from the screen. iOS tracks fingers
touching the screen throughout a multitouch sequence and records the characteristics of each of them,
including the location of the finger on the screen and the time the touch occurred. Applications often recognize
certain combinations of touches as gestures and respond to them in ways that are intuitive to users, such as
zooming in on content in response to a pinching gesture and scrolling through content in response to a flicking
gesture.
Notes: A finger on the screen affords a much different level of precision than a mouse pointer. When
a user touches the screen, the area of contact is actually elliptical and tends to be offset below the
point where the user thinks he or she touched. This “contact patch” also varies in size and shape
based on which finger is touching the screen, the size of the finger, the pressure of the finger on the
screen, the orientation of the finger, and other factors. The underlying Multi-Touch system analyzes
all of this information for you and computes a single touch point.
iOS 4.0 still reports touches on iPhone 4 (and on future high-resolution devices) in a 320x480
coordinate space to maintain source compatibility, but the resolution is twice as high in each
dimension for applications built for iOS 4.0 and later releases. In concrete terms, that means that
touchesfor applications built for iOS 4 running on iPhone 4 can land on half-point boundaries where
on older devices they land only on full point boundaries. If you have any round-to-integer code in
your touch-handling path you may lose this precision.
Many classes in UIKit handle multitouch events in ways that are distinctive to objects of the class. This is
especially true of subclasses of UIControl, such as UIButton and UISlider. Objects of these
subclasses—known as control objects—are receptive to certain types of gestures, such as a tap or a drag in a
certain direction; when properly configured, they send an action message to a target object when that gesture
occurs. Other UIKit classes handle gestures in other contexts; for example, UIScrollView provides scrolling
behavior for table views, text views, and other views with large content areas.
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
16
Multitouch EventsSome applications may not need to handle events directly; instead, they can rely on the classes of UIKit for
that behavior. However, if you create a custom subclass of UIView—a common pattern in iOS development—and
if you want that view to respond to certain touch events, you need to implement the code required to handle
those events. Moreover, if you want a UIKit object to respond to events differently, you have to create a subclass
of that framework class and override the appropriate event-handling methods.
Events and Touches
In iOS, a touch is the presence or movement of a finger on the screen that is part of a unique multitouch
sequence. For example, a pinch-close gesture has two touches: two fingers on the screen moving toward each
other from opposite directions. There are simple single-finger gestures, such as a tap, or a double-tap, a drag,
or a flick (where the user quickly swipes a finger across the screen). An application might recognize even more
complicated gestures; for example, an application might have a custom control in the shape of a dial that users
“turn” with multiple fingers to fine-tune some variable.
A UIEvent object of type UIEventTypeTouches represents a touch event. The system continually sends
these touch-event objects (or simply, touch events) to an application as fingers touch the screen and move
acrossitssurface. The event provides a snapshot of all touches during a multitouch sequence, most importantly
the touchesthat are new or have changed for a particular view. As depicted in Figure 2-1, a multitouch sequence
begins when a finger first touches the screen. Other fingers may subsequently touch the screen, and all fingers
may move across the screen. The sequence ends when the last of these fingers is lifted from the screen. An
application receives event objects during each phase of any touch.
Figure 2-1 A multitouch sequence and touch phases
UITouchPhaseBegan UITouchPhaseEnded
Touch 1
down
UITouchPhaseBegan
Touch 2
down
UITouchPhaseMoved
Touch 1 and 2
moved
Touch 1 and 2
up
Touches, which are represented by UITouch objects, have both temporal and spatial aspects. The temporal
aspect, called a phase, indicates when a touch has just begun, whether it is moving or stationary, and when it
ends—that is, when the finger is lifted from the screen.
Multitouch Events
Events and Touches
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
17The spatial aspect of touches concerns their association with the object in which they occur as well as their
location in it. When a finger touches the screen, the touch is associated with the underlying window and view
and maintains that association throughout the life of the event. If multiple touches arrive at once, they are
treated together only if they are associated with the same view. Likewise, if two touches arrive in quick
succession, they are treated as a multiple tap only if they are associated with the same view. A touch object
stores the current location and previous location (if any) of the touch in its view or window.
An event object contains all touch objects for the current multitouch sequence and can provide touch objects
specific to a view or window (see Figure 2-2). A touch object is persistent for a given finger during a sequence,
and UIKit mutates it as it tracks the finger throughout it. The touch attributes that change are the phase of the
touch, its location in a view, its previous location, and its timestamp. Event-handling code may evaluate these
attributes to determine how to respond to a touch event.
Figure 2-2 Relationship of a UIEvent object and its UITouch objects
UIEvent
UITouch
phase = UITouchPhaseBegan
locationInView = (35,50)
view = ViewA
phase = UITouchPhaseMoved
locationInView = (35,20)
view = ViewA
UITouch
phase = UITouchPhaseEnded
locationInView = (120,87)
view = ViewB
UITouch
Because the system can cancel a multitouch sequence at any time, an event-handling application must be
prepared to respond appropriately. Cancellations can occur as a result of overriding system events, such as an
incoming phone call.
Approaches for Handling Touch Events
Most applications that are interested in users’ touches on their custom views are interested in detecting and
handling well-established gestures. These gestures include tapping (one or multiple times), pinching (to zoom
a view in or out), swiping , panning or dragging a view, and using two fingers to rotate a view.
You could implement the touch-event handling code to recognize and handle these gestures, but that code
would be complex, possibly buggy, and take some time to write. Alternatively, you could simplify the
interpretation and handling of common gestures by using one of the gesture recognizer classes introduced
in iOS 3.2. To use a gesture recognizer, you instantiate it, attach it to the view receiving touches, configure it,
and assign it an action selector and a target object. When the gesture recognizer recognizes its gesture, it sends
an action message to the target, allowing the target to respond to the gesture.
Multitouch Events
Approaches for Handling Touch Events
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
18You can implement a custom gesture recognizer by subclassing UIGestureRecognizer. A custom gesture
recognizer requires you to analyze the stream of events in a multitouch sequence to recognize your distinct
gesture; to do this, you should be familiar with the information in this chapter.
For information about gesture recognizers, see “Gesture Recognizers” (page 39).
Regulating Touch Event Delivery
UIKit gives applications programmatic means to simplify event handling or to turn off the stream of UIEvent
objects completely. The following list summarizes these approaches:
● Turning off delivery of touch events. By default, a view receives touch events, but you can set its
userInteractionEnabled property to NO to turn off delivery of touch events. A view also does not
receive these events if it’s hidden or if it’s transparent.
● Turning off delivery of touch events for a period. An application can call the UIApplication method
beginIgnoringInteractionEvents and later call the endIgnoringInteractionEvents method.
The first method stops the application from receiving touch events entirely; the second method is called
to resume the receipt of such events. You sometimes want to turn off event delivery while your code is
performing animations.
● Turning on delivery of multiple touches. By default, a view ignores all but the first touch during a
multitouch sequence. If you want the view to handle multiple touches you must enable this capability for
the view. You do this programmatically by setting the multipleTouchEnabled property of your view
to YES, or in Interface Builder by setting the related attribute in the inspector for the related view.
● Restricting event delivery to a single view. By default, a view’s exclusiveTouch property is set to NO,
which means that this view does not block other views in a window from receiving touches. If you set the
property to YES, you mark the view so that, if it is tracking touches, it is the only view in the window that
is tracking touches. Other views in the window cannot receive those touches. However, a view that is
marked “exclusive touch” does not receive touches that are associated with other views in the same
window. If a finger contacts an exclusive-touch view, then that touch is delivered only if that view is the
only view tracking a finger in that window. If a finger touches a non-exclusive view, then that touch is
delivered only if there is not another finger tracking in an exclusive-touch view.
● Restricting event delivery to subviews. A custom UIView class can override hitTest:withEvent: to
restrict the delivery of multitouch events to its subviews. See “Hit-Testing” (page 33) for a discussion of
this technique.
Multitouch Events
Regulating Touch Event Delivery
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
19Handling Multitouch Events
To handle multitouch events, you must first create a subclass of a responder class. This subclass could be any
one of the following:
● A custom view (subclass of UIView)
● A subclass of UIViewController or one of its UIKit subclasses
● A subclass of a UIKit view or control class, such as UIImageView or UISlider
● A subclass of UIApplication or UIWindow (although this would be rare)
A view controller typically receives, via the responder chain, touch events initially sent to its view if that view
does not override the touch-handling methods.
For instances of your subclass to receive multitouch events, your subclass must implement one or more of the
UIResponder methods for touch-event handling, described below. In addition, the view must be visible
(neither transparent or hidden) and must have its userInteractionEnabled property set to YES, which is
the default.
The following sections describe the touch-event handling methods, describe approachesfor handling common
gestures, show an example of a responder object that handles a complex sequence of multitouch events,
discuss event forwarding, and suggest some techniques for event handling.
The Event-Handling Methods
During a multitouch sequence, the application dispatches a series of event messages to the target responder.
To receive and handle these messages, the class of a responder object must implement at least one of the
following methods declared by UIResponder, and, in some cases, all of these methods:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
The application sends these messages when there are new or changed touches for a given touch phase:
●
Itsendsthe touchesBegan:withEvent: message when one or more fingerstouch down on the screen.
●
It sends the touchesMoved:withEvent: message when one or more fingers move.
●
It sends the touchesEnded:withEvent: message when one or more fingers lift up from the screen.
Multitouch Events
Handling Multitouch Events
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
20●
It sends the touchesCancelled:withEvent: message when the touch sequence is cancelled by a
system event, such as an incoming phone call.
Each of these methodsis associated with a touch phase; for example, touchesBegan:withEvent: is associated
with UITouchPhaseBegan. You can get the phase of any UITouch object by evaluating its phase property.
Each message that invokes an event-handling method passes in two parameters. The first is a set of UITouch
objectsthat represent new or changed touchesfor the given phase. The second parameter is a UIEvent object
representing this particular event. From the event object you can get all touch objectsfor the event or a subset
of those touch objects filtered for specific views or windows. Some of these touch objects represent touches
that have not changed since the previous event message or that have changed but are in different phases.
Basics of Touch-Event Handling
You frequently handle an event for a given phase by getting one or more of the UITouch objects in the
passed-in set, evaluating their properties or getting their locations, and proceeding accordingly. The objects
in the set represent those touchesthat are new or have changed for the phase represented by the implemented
event-handling method. If any of the touch objects will do, you can send the NSSet object an anyObject
message; this is the case when the view receives only the first touch in a multitouch sequence (that is, the
multipleTouchEnabled property is set to NO).
An important UITouch method is locationInView:, which, if passed a parameter of self, yieldsthe location
of the touch in the coordinate system of the receiving view. A parallel method tells you the previous location
of the touch (previousLocationInView:). Properties of the UITouch instance tell you how many taps have
been made (tapCount), when the touch was created or last mutated (timestamp), and what phase it is in
(phase).
Multitouch Events
Handling Multitouch Events
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
21If for some reason you are interested in touches in the current multitouch sequence that have not changed
since the last phase or that are in a phase other than the ones in the passed-in set, you can request them from
the passed-in UIEvent object. The diagram in Figure 2-3 depicts a UIEvent object that contains four touch
objects. To get all these touch objects, you would invoke the allTouches on the event object.
Figure 2-3 All touches for a given touch event
Window B
Window A
UIEvent
UITouch
UITouch
UITouch
UITouch
View C
View A
View B
If on the other hand you are interested in only those touches associated with a specific window (Window A in
Figure 2-4), you would send the UIEvent object a touchesForWindow: message.
Figure 2-4 All touches belonging to a specific window
Window B
Window A
UIEvent
UITouch
UITouch
UITouch
UITouch
View C
View A
View B
Multitouch Events
Handling Multitouch Events
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
22If you want to get the touches associated with a specific view, you would call touchesForView: on the event
object, passing in the view object (View A in Figure 2-5).
Figure 2-5 All touches belonging to a specific view
Window B
Window A
UIEvent
UITouch
UITouch
UITouch
UITouch
View C
View A
View B
If a responder creates persistent objects while handling events during a multitouch sequence, it should
implement touchesCancelled:withEvent: to dispose ofthose objects when the system cancelsthe sequence.
Cancellation often occurs when an external event—for example, an incoming phone call—disruptsthe current
application’s event processing. Note that a responder object should also dispose of those same objects when
it receivesthe last touchesEnded:withEvent: message for a multitouch sequence. (See “Forwarding Touch
Events” (page 35) to find out how to determine the last UITouchPhaseEnded touch object in a multitouch
sequence.)
Multitouch Events
Handling Multitouch Events
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
23Important: If your custom responder class is a subclass of UIView or UIViewController, you should
implement all of the methods described in “The Event-Handling Methods” (page 20). If your class is a
subclass of any other UIKit responder class, you do not need to override all of the event-handling methods;
however, in those methods that you do override, be sure to call the superclass implementation of the
method (for example, super touchesBegan:touches withEvent:theEvent];). The reason for this
guideline issimple: All viewsthat processtouches, including your own, expect (orshould expect) to receive
a full touch-eventstream. If you prevent a UIKit responder object from receiving touchesfor a certain phase
of an event, the resulting behavior may be undefined and probably undesirable.
Handling Tap Gestures
A very common gesture in iOS applications is the tap: the user taps an object on the screen with his or her
finger. A responder object can handle a single tap in one way, a double-tap in another, and possibly a triple-tap
in yet another way. To determine the number of times the user tapped a responder object, you get the value
of the tapCount property of a UITouch object.
The best places to find this value are the methods touchesBegan:withEvent: and
touchesEnded:withEvent:. In many cases, the latter method is preferred because it corresponds to the
touch phase in which the user lifts a finger from a tap. By looking for the tap count in the touch-up phase
(UITouchPhaseEnded), you ensure that the finger is really tapping and not, for instance, touching down and
then dragging.
Listing 2-1 shows how to determine whether a double-tap occurred in one of your views.
Listing 2-1 Detecting a double-tap gesture
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
for (UITouch *touch in touches) {
if (touch.tapCount >= 2) {
[self.superview bringSubviewToFront:self];
}
}
Multitouch Events
Handling Multitouch Events
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
24}
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {
}
A complication arises when a responder object wants to handle a single-tap and a double-tap gesture in
different ways. For example, a single tap might select the object and a double tap might display a view for
editing the item that was double-tapped. How is the responder object to know that a single tap is not the first
part of a double tap? Listing 2-2 (page 25) illustrates an implementation of the event-handling methods that
increases the size of the receiving view upon a double-tap gesture and decreases it upon a single-tap gesture.
The following is a commentary on this code:
1. In touchesEnded:withEvent:, when the tap count is one, the responder object sends itself a
performSelector:withObject:afterDelay: message. The selector identifies another method
implemented by the responder to handle the single-tap gesture; the second parameter is an NSValue or
NSDictionary object that holdssome state of the UITouch object; the delay issome reasonable interval
between a single- and a double-tap gesture.
Note: Because a touch object is mutated as it proceeds through a multitouch sequence, you
cannot retain a touch and assume that itsstate remainsthe same. (And you cannot copy a touch
object because UITouch does not adopt the NSCopying protocol.) Thusif you want to preserve
the state of a touch object, you should store those bits ofstate in a NSValue object, a dictionary,
or a similar object. (The code in Listing 2-2 stores the location of the touch in a dictionary but
does not use it; this code is included for purposes of illustration.)
2. In touchesBegan:withEvent:, if the tap count is two, the responder object cancels the pending
delayed-perform invocation by calling the cancelPreviousPerformRequestsWithTarget: method
of NSObject, passing itself as the argument. If the tap count is not two, the method identified by the
selector in the previous step for single-tap gestures is invoked after the delay.
3. In touchesEnded:withEvent:, if the tap count is two, the responder performs the actions necessary
for handling double-tap gestures.
Listing 2-2 Handling a single-tap gesture and a double-tap gesture
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *aTouch = [touches anyObject];
if (aTouch.tapCount == 2) {
Multitouch Events
Handling Multitouch Events
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
25[NSObject cancelPreviousPerformRequestsWithTarget:self];
}
}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *theTouch = [touches anyObject];
if (theTouch.tapCount == 1) {
NSDictionary *touchLoc = [NSDictionary dictionaryWithObject:
[NSValue valueWithCGPoint:[theTouch locationInView:self]]
forKey:@"location"];
[self performSelector:@selector(handleSingleTap:) withObject:touchLoc
afterDelay:0.3];
} else if (theTouch.tapCount == 2) {
// Double-tap: increase image size by 10%"
CGRect myFrame = self.frame;
myFrame.size.width += self.frame.size.width * 0.1;
myFrame.size.height += self.frame.size.height * 0.1;
myFrame.origin.x -= (self.frame.origin.x * 0.1) / 2.0;
myFrame.origin.y -= (self.frame.origin.y * 0.1) / 2.0;
[UIView beginAnimations:nil context:NULL];
[self setFrame:myFrame];
[UIView commitAnimations];
}
}
- (void)handleSingleTap:(NSDictionary *)touches {
// Single-tap: decrease image size by 10%"
CGRect myFrame = self.frame;
myFrame.size.width -= self.frame.size.width * 0.1;
myFrame.size.height -= self.frame.size.height * 0.1;
myFrame.origin.x += (self.frame.origin.x * 0.1) / 2.0;
myFrame.origin.y += (self.frame.origin.y * 0.1) / 2.0;
Multitouch Events
Handling Multitouch Events
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
26[UIView beginAnimations:nil context:NULL];
[self setFrame:myFrame];
[UIView commitAnimations];
}
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {
/* no state to clean up, so null implementation */
}
Handling Swipe and Drag Gestures
Horizontal and vertical swipes are a simple type of gesture that you can track easily from your own code and
use to perform actions. To detect a swipe gesture, you have to track the movement of the user’s finger along
the desired axis of motion, but it is up to you to determine what constitutes a swipe. In other words, you need
to determine whether the user’s finger moved far enough, if it moved in a straight enough line, and if it went
fast enough. You do that by storing the initial touch location and comparing it to the location reported by
subsequent touch-moved events.
Listing 2-3 shows some basic tracking methods you could use to detect horizontal swipes in a view. In this
example, the view stores the initial location of the touch in a startTouchPosition instance variable. As the
user’sfinger moves, the code comparesthe current touch location to the starting location to determine whether
it is a swipe. If the touch moves too far vertically, it is not considered to be a swipe and is processed differently.
If it continues along its horizontal trajectory, however, the code continues processing the event as if it were a
swipe. The processing routines could then trigger an action once the swipe had progressed far enough
horizontally to be considered a complete gesture. To detect swipe gestures in the vertical direction, you would
use similar code but would swap the x and y components.
Listing 2-3 Tracking a swipe gesture in a view
#define HORIZ_SWIPE_DRAG_MIN 12
#define VERT_SWIPE_DRAG_MAX 4
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
// startTouchPosition is an instance variable
startTouchPosition = [touch locationInView:self];
}
Multitouch Events
Handling Multitouch Events
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
27- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
CGPoint currentTouchPosition = [touch locationInView:self];
// To be a swipe, direction of touch must be horizontal and long enough.
if (fabsf(startTouchPosition.x - currentTouchPosition.x) >= HORIZ_SWIPE_DRAG_MIN
&&
fabsf(startTouchPosition.y - currentTouchPosition.y) <= VERT_SWIPE_DRAG_MAX)
{
// It appears to be a swipe.
if (startTouchPosition.x < currentTouchPosition.x)
[self myProcessRightSwipe:touches withEvent:event];
else
[self myProcessLeftSwipe:touches withEvent:event];
}
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
startTouchPosition = CGPointZero;
}
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {
startTouchPosition = CGPointZero;
}
Listing 2-4 shows an even simpler implementation of tracking a single touch, but this time for the purposes
of dragging the receiving view around the screen. In this instance, the responder class fully implements only
the touchesMoved:withEvent: method, and in this method computes a delta value between the touch's
current location in the view and its previouslocation in the view. It then usesthis delta value to reset the origin
of the view’s frame.
Listing 2-4 Dragging a view using a single touch
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
}
Multitouch Events
Handling Multitouch Events
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
28- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *aTouch = [touches anyObject];
CGPoint loc = [aTouch locationInView:self];
CGPoint prevloc = [aTouch previousLocationInView:self];
CGRect myFrame = self.frame;
float deltaX = loc.x - prevloc.x;
float deltaY = loc.y - prevloc.y;
myFrame.origin.x += deltaX;
myFrame.origin.y += deltaY;
[self setFrame:myFrame];
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
}
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {
}
Handling a Complex Multitouch Sequence
Taps, drags, and swipes are simple gestures, typically involving only a single touch. Handling a touch event
consisting of two or more touches is a more complicated affair. You may have to track all touches through all
phases, recording the touch attributes that have changed and altering internal state appropriately. There are
a couple of things you should do when tracking and handling multiple touches:
● Set the multipleTouchEnabled property of the view to YES.
● Use a Core Foundation dictionary object (CFDictionaryRef) to track the mutations of touches through
their phases during the event.
When handling an event with multiple touches, you often store initial bits of each touch’s state for later
comparison with the mutated UITouch instance. As an example, say you want to compare the final location
of each touch with its original location. In the touchesBegan:withEvent: method, you can obtain the
original location of each touch from the locationInView: method and store those in a CFDictionaryRef
object using the addresses of the UITouch objects as keys. Then, in the touchesEnded:withEvent: method
you can use the address of each passed-in UITouch object to obtain the object’s original location and compare
Multitouch Events
Handling Multitouch Events
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
29that with its current location. (You should use a CFDictionaryRef type rather than an NSDictionary object;
the latter copies its keys, but the UITouch class does not adopt the NSCopying protocol, which is required
for object copying.)
Listing 2-5 illustrates how you might store beginning locations of UITouch objects in a Core Foundation
dictionary.
Listing 2-5 Storing the beginning locations of multiple touches
- (void)cacheBeginPointForTouches:(NSSet *)touches
{
if ([touches count] > 0) {
for (UITouch *touch in touches) {
CGPoint *point = (CGPoint *)CFDictionaryGetValue(touchBeginPoints,
touch);
if (point == NULL) {
point = (CGPoint *)malloc(sizeof(CGPoint));
CFDictionarySetValue(touchBeginPoints, touch, point);
}
*point = [touch locationInView:view.superview];
}
}
}
Listing 2-6 illustrates how to retrieve those initial locations stored in the dictionary. It also gets the current
locations of the same touches. It uses these values in computing an affine transformation (not shown).
Listing 2-6 Retrieving the initial locations of touch objects
- (CGAffineTransform)incrementalTransformWithTouches:(NSSet *)touches {
NSArray *sortedTouches = [[touches allObjects]
sortedArrayUsingSelector:@selector(compareAddress:)];
// other code here ...
UITouch *touch1 = [sortedTouches objectAtIndex:0];
UITouch *touch2 = [sortedTouches objectAtIndex:1];
Multitouch Events
Handling Multitouch Events
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
30CGPoint beginPoint1 = *(CGPoint *)CFDictionaryGetValue(touchBeginPoints,
touch1);
CGPoint currentPoint1 = [touch1 locationInView:view.superview];
CGPoint beginPoint2 = *(CGPoint *)CFDictionaryGetValue(touchBeginPoints,
touch2);
CGPoint currentPoint2 = [touch2 locationInView:view.superview];
// compute the affine transform...
}
Although the code example in Listing 2-7 doesn’t use a dictionary to track touch mutations, it also handles
multiple touches during an event. It shows a custom UIView object responding to touches by animating the
movement of a “Welcome” placard around the screen as a finger moves it and changing the language of the
welcome when the user makes a double-tap gesture. (The code in this example comes from the MoveMe
sample code project, which you can examine to get a better understanding of the event-handling context.)
Listing 2-7 Handling a complex multitouch sequence
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [[event allTouches] anyObject];
// Only move the placard view if the touch was in the placard view
if ([touch view] != placardView) {
// On double tap outside placard view, update placard's display string
if ([touch tapCount] == 2) {
[placardView setupNextDisplayString];
}
return;
}
// "Pulse" the placard view by scaling up then down
// Use UIView's built-in animation
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5];
CGAffineTransform transform = CGAffineTransformMakeScale(1.2, 1.2);
placardView.transform = transform;
[UIView commitAnimations];
[UIView beginAnimations:nil context:NULL];
Multitouch Events
Handling Multitouch Events
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
31[UIView setAnimationDuration:0.5];
transform = CGAffineTransformMakeScale(1.1, 1.1);
placardView.transform = transform;
[UIView commitAnimations];
// Move the placardView to under the touch
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.25];
placardView.center = [self convertPoint:[touch locationInView:self]
fromView:placardView];
[UIView commitAnimations];
}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [[event allTouches] anyObject];
// If the touch was in the placardView, move the placardView to its location
if ([touch view] == placardView) {
CGPoint location = [touch locationInView:self];
location = [self convertPoint:location fromView:placardView];
placardView.center = location;
return;
}
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [[event allTouches] anyObject];
// If the touch was in the placardView, bounce it back to the center
if ([touch view] == placardView) {
// Disable user interaction so subsequent touches don't interfere with
animation
self.userInteractionEnabled = NO;
[self animatePlacardViewToCenter];
return;
}
}
Multitouch Events
Handling Multitouch Events
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
32Note: Custom views that redraw themselves in response to events they handle generally should
only set drawing state in the event-handling methods and perform all of the drawing in the
drawRect: method. To learn more about drawing view content, see View Programming Guide for
iOS .
To find out when the last finger in a multitouch sequence islifted from a view, compare the number of UITouch
objects in the passed-in set with the number of touches for the view maintained by the passed-in UIEvent
object. If they are the same, then the multitouch sequence has concluded. Listing 2-8 illustrates how to do this
in code.
Listing 2-8 Determining when the last touch in a multitouch sequence has ended
- (void)touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event {
if ([touches count] == [[event touchesForView:self] count]) {
// last finger has lifted....
}
}
Remember that the passed-in set contains all touch objects associated with the receiving view that are new
or changed for the given phase whereas the touch objects returned from touchesForView: includes all
objects associated with the specified view.
Hit-Testing
Your custom responder can use hit-testing to find the subview or sublayer of itself that is "under” a touch, and
then handle the event appropriately. It does this by either calling the hitTest:withEvent: method of
UIView or the hitTest: method of CALayer; or it can override one of these methods. Responderssometimes
perform hit-testing prior to event forwarding (see “Forwarding Touch Events” (page 35)).
Note: The hitTest:withEvent: and hitTest: methods have some slightly different behaviors.
If the point passed into hitTest:withEvent: or hitTest: is outside the bounds of the view, it is ignored.
This means that subviews that are outside their superview do not receive touch events.
If you have a custom view with subviews, you need to determine whether you want to handle touches at the
subview level or the superview level. If the subviews do not handle touches by implementing
touchesBegan:withEvent:, touchesEnded:withEvent:, or touchesMoved:withEvent:, then these
messages propagate up the responder chain to the superview. However, because multiple taps and multiple
Multitouch Events
Handling Multitouch Events
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
33touches are associated with the subviews where they first occurred, the superview won’t receive these touches.
To ensure reception of all kinds of touches, the superview should override hitTest:withEvent: to return
itself rather than any of its subviews.
The example in Listing 2-9 detects when an “Info” image in a layer of the custom view is tapped.
Listing 2-9 Calling hitTest: on a view’s CALayer object
- (void)touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event {
CGPoint location = [[touches anyObject] locationInView:self];
CALayer *hitLayer = [[self layer] hitTest:[self convertPoint:location
fromView:nil]];
if (hitLayer == infoImage) {
[self displayInfo];
}
}
In Listing 2-10, a responder subclass (in this case, a subclass of UIWindow) overrides hitTest:withEvent:.
It first gets the hit-test view returned by the superclass. Then, if that view is itself, it substitutes the view that
is furthest down the view hierarchy.
Listing 2-10 Overriding hitTest:withEvent:
- (UIView*)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
UIView *hitView = [super hitTest:point withEvent:event];
if (hitView == self)
return [[self subviews] lastObject];
else
return hitView;
}
Multitouch Events
Handling Multitouch Events
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
34Forwarding Touch Events
Event forwarding is a technique used by some applications. You forward touch events by invoking the
event-handling methods of another responder object. Although this can be an effective technique, you should
use it with caution. The classes of the UIKit framework are not designed to receive touches that are not bound
to them; in programmatic terms, this means that the view property of the UITouch object must hold a
reference to the framework object in order for the touch to be handled. If you want to conditionally forward
touches to other responders in your application, all of these responders should be instances of your own
subclasses of UIView.
For example, let’s say an application has three custom views: A, B, and C. When the user touches view A, the
application’s window determines that it is the hit-test view and sends the initial touch event to it. Depending
on certain conditions, view A forwards the event to either view B or view C. In this case, views A, B, and C must
be aware that this forwarding is going on, and views B and C must be able to deal with touches that are not
bound to them.
Event forwarding often requires analysis of touch objectsto determine where they should be forwarded. There
are several approaches you can take for this analysis:
● With an “overlay” view (such as a common superview), use hit-testing to intercept events for analysis prior
to forwarding them to subviews (see “Hit-Testing” (page 33)).
● Override sendEvent: in a custom subclass of UIWindow, analyze touches, and forward them to the
appropriate responders. In your implementation you should alwaysinvoke the superclassimplementation
of sendEvent:.
● Design your application so that touch analysis isn’t necessary
Listing 2-11 illustrates the second technique, that of overriding sendEvent: in a subclass of UIWindow. In
this example, the object to which touch events are forwarded is a custom “helper” responder that performs
affine transformations on the view that is associated with.
Listing 2-11 Forwarding touch events to “helper” responder objects
- (void)sendEvent:(UIEvent *)event
{
for (TransformGesture *gesture in transformGestures) {
// collect all the touches we care about from the event
NSSet *touches = [gesture observedTouchesForEvent:event];
NSMutableSet *began = nil;
NSMutableSet *moved = nil;
NSMutableSet *ended = nil;
Multitouch Events
Handling Multitouch Events
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
35NSMutableSet *cancelled = nil;
// sort the touches by phase so we can handle them similarly to normal
event dispatch
for(UITouch *touch in touches) {
switch ([touch phase]) {
case UITouchPhaseBegan:
if (!began) began = [NSMutableSet set];
[began addObject:touch];
break;
case UITouchPhaseMoved:
if (!moved) moved = [NSMutableSet set];
[moved addObject:touch];
break;
case UITouchPhaseEnded:
if (!ended) ended = [NSMutableSet set];
[ended addObject:touch];
break;
case UITouchPhaseCancelled:
if (!cancelled) cancelled = [NSMutableSet set];
[cancelled addObject:touch];
break;
default:
break;
}
}
// call our methods to handle the touches
if (began) [gesture touchesBegan:began withEvent:event];
if (moved) [gesture touchesMoved:moved withEvent:event];
if (ended) [gesture touchesEnded:ended withEvent:event];
if (cancelled) [gesture touchesCancelled:cancelled withEvent:event];
}
[super sendEvent:event];
}
Multitouch Events
Handling Multitouch Events
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
36Notice that in this example that the overriding subclass does something important to the integrity of the
touch-event stream: It invokes the superclass implementation of sendEvent:.
Handling Events in Subclasses of UIKit Views and Controls
If you subclass a view or control class of the UIKit framework (for example, UIImageView or UISwitch) for
the purpose of altering or extending event-handling behavior, you should keep the following points in mind:
● Unlike in a custom view, it is not necessary to override each event-handling method.
● Always invoke the superclass implementation of each event-handling method that you do override.
● Do not forward events to UIKit framework objects.
Best Practices for Handling Multitouch Events
When handling events, both touch events and motion events, there are a few recommended techniques and
patterns you should follow.
● Always implement the event-cancellation methods.
In your implementation, you should restore the state of the view to what it was before the current
multitouch sequence, freeing any transient resourcesset up for handling the event. If you don’t implement
the cancellation method your view could be left in an inconsistent state. In some cases, another view
might receive the cancellation message.
●
If you handle events in a subclass of UIView, UIViewController, or (in rare cases) UIResponder,
● You should implement all of the event-handling methods (even if it is a null implementation).
● Do not call the superclass implementation of the methods.
●
If you handle events in a subclass of any other UIKit responder class,
● You do not have to implement all of the event-handling methods.
● But in the methods you do implement, be sure to call the superclass implementation. For example,
[super touchesBegan:theTouches withEvent:theEvent];
● Do not forward events to other responder objects of the UIKit framework.
The responders that you forward events to should be instances of your own subclasses of UIView, and
all of these objects must be aware that event-forwarding is taking place and that, in the case of touch
events, they may receive touches that are not bound to them.
● Custom views that redraw themselves in response to events should only set drawing state in the
event-handling methods and perform all of the drawing in the drawRect: method.
Multitouch Events
Best Practices for Handling Multitouch Events
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
37● Do not explicitly send events up the responder (via nextResponder); instead, invoke the superclass
implementation and let the UIKit handle responder-chain traversal.
Multitouch Events
Best Practices for Handling Multitouch Events
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
38Note: This chapter containsinformation that used to be in iPad ProgrammingGuide . The information
in this chapter has not been updated specifically for iOS 4.0.
Applicationsfor iOS are driven largely through events generated when userstouch buttons, toolbars, table-view
rows and other objects in an application’s user interface. The classes of the UIKit framework provide default
event-handling behavior for most of these objects. However, some applications, primarily those with custom
views, have to do their own event handling. They have to analyze the stream of touch objects in a multitouch
sequence and determine the intention of the user.
Most event-handling views seek to detect common gestures that users make on their surface—things such as
triple-tap, touch-and-hold (also called long press), pinching, and rotating gestures, The code for examining a
raw stream of multitouch events and detecting one or more gestures is often complex. Prior to iOS 3.2, you
cannot reuse the code except by copying it to another project and modifying it appropriately.
To help applications detect gestures, iOS 3.2 introduces gesture recognizers, objects that inherit directly from
the UIGestureRecognizer class. The following sections tell you about how these objects work, how to use
them, and how to create custom gesture recognizers that you can reuse among your applications.
Gesture Recognizers Simplify Event Handling
UIGestureRecognizer is the abstract base class for concrete gesture-recognizer subclasses (or, simply,
gesture recognizers). The UIGestureRecognizer class defines a programmatic interface and implements
the behavioral underpinnings for gesture recognition. The UIKit framework provides six gesture recognizers for
the most common gestures. For other gestures, you can design and implement your own gesture recognizer
(see “Creating Custom Gesture Recognizers” (page 50) for details).
Recognized Gestures
The UIKit framework supports the recognition of the gestures listed in Table 3-1. Each of the listed classes is a
direct subclass of UIGestureRecognizer.
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
39
Gesture RecognizersTable 3-1 Gestures recognized by the gesture-recognizer classes of the UIKit framework
Gesture UIKit class
Tapping (any number of taps) UITapGestureRecognizer
Pinching in and out (for zooming a view) UIPinchGestureRecognizer
Panning or dragging UIPanGestureRecognizer
Swiping (in any direction) UISwipeGestureRecognizer
Rotating (fingers moving in opposite directions) UIRotationGestureRecognizer
Long press (also known as “touch and hold”) UILongPressGestureRecognizer
Before you decide to use a gesture recognizer, consider how you are going to use it. Respond to gestures only
in ways that users expect. For example, a pinching gesture should scale a view, zooming it in and out; it should
not be interpreted as, say, a selection request, for which a tap is more appropriate. For guidelines about the
proper use of gestures, see iOS Human Interface Guidelines.
Gestures Recognizers Are Attached to a View
To detect its gestures, a gesture recognizer must be attached to the view that a user is touching. This view is
known as the hit-tested view. Recall that events in iOS are represented by UIEvent objects, and each event
object encapsulates the UITouch objects of the current multitouch sequence. A set of those UITouch objects
is specific to a given phase of a multitouch sequence. Delivery of events initially follows the usual path: from
operating system to the application object to the window object representing the window in which the touches
Gesture Recognizers
Gesture Recognizers Simplify Event Handling
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
40are occurring. But before sending an event to the hit-tested view, the window object sends it to the gesture
recognizer attached to that view or to any of that view’s subviews. Figure 3-1 illustrates this general path, with
the numbers indicating the order in which touches are received.
Figure 3-1 Path of touch objects when gesture recognizer is attached to a view
UIApplication
View
Gesture
Recognizer
Touch
UIWindow
1
Touch
2
Touch
3
Thus gesture recognizers act as observers of touch objects sent to their attached view or view hierarchy.
However, they are not part of that view hierarchy and do not participate in the responder chain. Gesture
recognizers may delay the delivery of touch objects to the view while they are recognizing gestures, and by
default they cancel delivery of remaining touch objects to the view once they recognize their gesture. For
more on the possible scenarios of event delivery from a gesture recognizer to its view, see “Regulating the
Delivery of Touches to Views” (page 48).
For some gestures, the locationInView: and the locationOfTouch:inView: methods of
UIGestureRecognizer enable clients to find the location of gestures or specific touches in the attached
view or its subviews. See “Responding to Gestures” (page 44) for more information.
Gestures Trigger Action Messages
When a gesture recognizer recognizes its gesture, it sends one or more action messages to one or more targets.
When you create a gesture recognizer, you initialize it with an action and a target. You may add more
target-action pairs to it thereafter. The target-action pairs are not additive; in other words, an action is only
sent to the target it was originally linked with, and not to other targets (unless they’re specified in another
target-action pair).
Discrete Gestures and Continuous Gestures
When a gesture recognizer recognizes a gesture, it sends either a single action message to its target or multiple
action messages until the gesture ends. This behavior is determined by whether the gesture is discrete or
continuous. A discrete gesture, such as a double-tap, happens just once; when a gesture recognizer recognizes
Gesture Recognizers
Gesture Recognizers Simplify Event Handling
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
41a discrete gesture, it sends its target a single action message. A continuous gesture, such as pinching, takes
place over a period and ends when the user lifts the final finger in the multitouch sequence. The gesture
recognizer sends action messages to its target at short intervals until the multitouch sequence ends.
Figure 3-2 Discrete versus continuous gestures
UITapGestureRecognizer
Tapping gesture
Pinching gesture
Touch events
Target
UIPinchGestureRecognizer Target
Action messages
Action messages
Touch events
The reference documents for the gesture-recognizer classes note whether the instances of the class detect
discrete or continuous gestures.
Implementing Gesture Recognition
To implement gesture recognition, you create a gesture-recognizer instance to which you assign a target, action,
and, in some cases, gesture-specific attributes. You attach this object to a view and then implement the action
method in your target object that handles the gesture.
Gesture Recognizers
Implementing Gesture Recognition
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
42Preparing a Gesture Recognizer
To create a gesture recognizer, you must allocate and initialize an instance of a concrete UIGestureRecognizer
subclass. When you initialize it, specify a target object and an action selector, as in the following code:
UITapGestureRecognizer *doubleFingerDTap = [[UITapGestureRecognizer alloc]
initWithTarget:self action:@selector(handleDoubleDoubleTap:)];
The action methods for handling gestures—and the selector for identifying them—are expected to conform
to one of two signatures:
- (void)handleGesture
- (void)handleGesture:(UIGestureRecognizer *)sender
where handleGesture and sender can be any name you choose. Methods having the second signature allow
the target to query the gesture recognizer for addition information. For example, the target of a
UIPinchGestureRecognizer object can ask that object for the current scale factor related to the pinching
gesture.
After you create a gesture recognizer, you must attach it to the view receiving touches—that is, the hit-test
view—using the UIView method addGestureRecognizer:. You can find out what gesture recognizers a
view currently has attached through the gestureRecognizers property, and you can detach a gesture
recognizer from a view by calling removeGestureRecognizer:.
The sample method in Listing 3-1 creates and initializes three gesture recognizers: a single-finger double-tap,
a panning gesture, and a rotation gesture. It then attaches each gesture-recognizer object to the same view.
For the singleFingerDTap object, the code specifies that two taps are required for the gesture to be
recognized. Each method adds the created gesture recognizer to a view and then releases it (because the view
now retains it).
Listing 3-1 Creating and initializing discrete and continuous gesture recognizers
- (void)createGestureRecognizers {
UITapGestureRecognizer *singleFingerDTap = [[UITapGestureRecognizer alloc]
initWithTarget:self action:@selector(handleSingleDoubleTap:)];
singleFingerDTap.numberOfTapsRequired = 2;
[self.theView addGestureRecognizer:singleFingerDTap];
[singleFingerDTap release];
UIPanGestureRecognizer *panGesture = [[UIPanGestureRecognizer alloc]
Gesture Recognizers
Implementing Gesture Recognition
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
43initWithTarget:self action:@selector(handlePanGesture:)];
[self.theView addGestureRecognizer:panGesture];
[panGesture release];
UIPinchGestureRecognizer *pinchGesture = [[UIPinchGestureRecognizer alloc]
initWithTarget:self action:@selector(handlePinchGesture:)];
[self.theView addGestureRecognizer:pinchGesture];
[pinchGesture release];
}
You may also add additional targets and actions to a gesture recognizer using the addTarget:action:
method of UIGestureRecognizer. Remember that action messages for each target and action pair are
restricted to that pair; if you have multiple targets and actions, they are not additive.
Responding to Gestures
To handle a gesture, the target for the gesture recognizer must implement a method corresponding to the
action selector specified when you initialized the gesture recognizer. For discrete gestures, such as a tapping
gesture, the gesture recognizer invokesthe method once per recognition; for continuous gestures, the gesture
recognizer invokes the method at repeated intervals until the gesture ends (that is, the last finger is lifted from
the gesture recognizer’s view).
In gesture-handling methods, the target object often gets additional information about the gesture from the
gesture recognizer; it does this by obtaining the value of a property defined by the gesture recognizer, such as
scale (for scale factor) or velocity. It can also query the gesture recognizer (in appropriate cases) for the
location of the gesture.
Listing 3-2 shows handlers for two continuous gestures: a pinching gesture (handlePinchGesture:) and a
panning gesture (handlePanGesture:). It also gives an example of a handler for a discrete gesture; in this
example, when the user double-taps the view with a single finger, the handler (handleSingleDoubleTap:)
centers the view at the location of the double-tap.
Listing 3-2 Handling pinch, pan, and double-tap gestures
- (IBAction)handlePinchGesture:(UIGestureRecognizer *)sender {
CGFloat factor = [(UIPinchGestureRecognizer *)sender scale];
self.view.transform = CGAffineTransformMakeScale(factor, factor);
}
Gesture Recognizers
Implementing Gesture Recognition
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
44- (IBAction)handlePanGesture:(UIPanGestureRecognizer *)sender {
CGPoint translate = [sender translationInView:self.view];
CGRect newFrame = currentImageFrame;
newFrame.origin.x += translate.x;
newFrame.origin.y += translate.y;
sender.view.frame = newFrame;
if (sender.state == UIGestureRecognizerStateEnded)
currentImageFrame = newFrame;
}
- (IBAction)handleSingleDoubleTap:(UIGestureRecognizer *)sender {
CGPoint tapPoint = [sender locationInView:sender.view.superview];
[UIView beginAnimations:nil context:NULL];
sender.view.center = tapPoint;
[UIView commitAnimations];
}
These action methods handle the gestures in distinctive ways:
●
In the handlePinchGesture: method, the target communicates with its gesture recognizer (sender)
to get the scale factor (scale). The method uses the scale value in a Core Graphics function that scales
the view and assigns the computed value to the view’s affine transform property.
● The handlePanGesture: method applies the translationInView: values obtained from its gesture
recognizer to a cached frame value for the attached view. When the gesture concludes, it caches the
newest frame value.
●
In the handleSingleDoubleTap: method, the target gets the location of the double-tap gesture from
its gesture recognizer by calling the locationInView: method. It then uses this point, converted to
superview coordinates, to animate the center of the view to the location of the double-tap.
The scale factor obtained in the handlePinchGesture: method, as with the rotation angle and the translation
value related to other recognizers of continuous gestures, is to be applied to the state of the view when the
gesture is first recognized. It is not a delta value to be concatenated over each handler invocation for a given
gesture.
Gesture Recognizers
Implementing Gesture Recognition
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
45A hit-test with an attached gesture recognizer does not have to be passive when there are incoming touch
events. Instead, it can determine which gesture recognizers, if any, are involved with a particular UITouch
object by querying the gestureRecognizers property. Similarly, it can find out which touches a given gesture
recognizer is analyzing for a given event by calling the UIEvent method touchesForGestureRecognizer:.
Interacting with Other Gesture Recognizers
More than one gesture recognizer may be attached to a view. In the default behavior, touch events in a
multitouch sequence go from one gesture recognizer to another in a nondeterministic order until the events
are finally delivered to the view (if at all). Often this default behavior is what you want. But sometimes you
might want one or more of the following behaviors:
● Have one gesture recognizer fail before another can start analyzing touch events.
● Prevent other gesture recognizers from analyzing a specific multitouch sequence or a touch object in that
sequence.
● Permit two gesture recognizers to operate simultaneously.
The UIGestureRecognizer class provides client methods, delegate methods, and methods overridden by
subclasses to enable you to effect these behaviors.
Requiring a Gesture Recognizer to Fail
You might want a relationship between two gesture recognizers so that one can operate only if the other one
fails. For example, recognizer A doesn’t begin analyzing a multitouch sequence until recognizer B fails and,
conversely, if recognizer B does recognize its gesture, recognizer A never looks at the multitouch sequence.
An example where you might specify this relationship is when you have a gesture recognizer for a single tap
and another gesture recognizer for a double tap; the single-tap recognizer requires the double-tap recognizer
to fail before it begins operating on a multitouch sequence.
The method you call to specify this relationship is requireGestureRecognizerToFail:. After sending the
message, the receiving gesture recognizer must stay in the UIGestureRecognizerStatePossible state
until the specified gesture recognizer transitions to UIGestureRecognizerStateFailed. If the specified
gesture recognizer transitions to UIGestureRecognizerStateRecognized or
UIGestureRecognizerStateBegan instead, then the receiving recognizer can proceed, but no actionmessage
is sent if it recognizes its gesture.
Gesture Recognizers
Interacting with Other Gesture Recognizers
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
46Note: In the case of the single-tap versus double-tap gestures, if a single-tap gesture recognizer
doesn’t require the double-tap recognizer to fail, you should expect to receive yoursingle-tap actions
before your double-tap actions, even in the case of a double tap. This is expected and desirable
behavior because the best user experience generally involvesstackable actions. If you want double-tap
and single-tap gesture recognizersto have mutually exclusive actions, you can require the double-tap
recognizer to fail. You won't get any single-tap actions on a double tap, but any single-tap actions
you do receive will necessarily lag behind the user's touch input. In other words, there is no way to
know if the user double tapped until after the double-tap delay,so the single-tap gesture recognizer
cannot send its action until that delay has passed.
For a discussion of gesture-recognition states and possible transition between these states, see “State
Transitions” (page 50).
Preventing Gesture Recognizers from Analyzing Touches
You can prevent gesture recognizers from looking at specific touches or from even recognizing a gesture. You
can specify these “prevention” relationships using either delegation methods or overriding methods declared by
the UIGestureRecognizer class.
The UIGestureRecognizerDelegate protocol declares two optional methods that prevent specific gesture
recognizers from recognizing gestures on a case-by-case basis:
● gestureRecognizerShouldBegin: — This method is called when a gesture recognizer attempts to
transition out of UIGestureRecognizerStatePossible. Return NO to make it transition to
UIGestureRecognizerStateFailed instead. (The default value is YES.)
● gestureRecognizer:shouldReceiveTouch: —This method is called before the window object calls
touchesBegan:withEvent: on the gesture recognizer when there are one or more new touches. Return
NO to prevent the gesture recognizer from seeing the objects representing these touches. (The default
value is YES.)
In addition,there are two UIGestureRecognizermethods(declared in UIGestureRecognizerSubclass.h)
that effect the same behavior as these delegation methods. A subclass can override these methods to define
class-wide prevention rules:
- (BOOL)canPreventGestureRecognizer:(UIGestureRecognizer
*)preventedGestureRecognizer;
- (BOOL)canBePreventedByGestureRecognizer:(UIGestureRecognizer
*)preventingGestureRecognizer;
Gesture Recognizers
Interacting with Other Gesture Recognizers
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
47Permitting Simultaneous Gesture Recognition
By default, no two gesture recognizers can attempt to recognize their gestures simultaneously. But you can
change this behavior by implementing
gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:, an optional
method of the UIGestureRecognizerDelegate protocol. This method is called when the recognition of the
receiving gesture recognizer would block the operation of the specified gesture recognizer, or vice versa.
Return YES to allow both gesture recognizers to recognize their gestures simultaneously.
Note: Returning YES is guaranteed to allow simultaneous recognition, but returning NO is not
guaranteed to prevent simultaneous recognition because the other gesture's delegate may return
YES.
Regulating the Delivery of Touches to Views
Generally, a window delivers UITouch objects (packaged in UIEvent objects) to a gesture recognizer before
it delivers them to the attached hit-test view. But there are some subtle detours and dead-ends in this general
delivery path that depend on whether a gesture is recognized. You can alter this delivery path to suit the
requirements of your application.
Default Touch-Event Delivery
By default a window in a multitouch sequence delays the delivery of touch objects in Ended phases to the
hit-test view and, if the gesture is recognized, both prevents the delivery of current touch objects to the view
and cancels touch objects previously received by the view. The exact behavior depends on the phase of touch
objects and on whether a gesture recognizer recognizes its gesture or fails to recognize it in a multitouch
sequence.
To clarify this behavior, consider a hypothetical gesture recognizer for a discrete gesture involving two touches
(that is, two fingers). Touch objects enter a system and are passed from the UIApplication object to the
UIWindow object for the hit-test view. The following sequence occurs when the gesture is recognized:
1. The window sendstwo touch objectsin the Began phase (UITouchPhaseBegan) to the gesture recognizer,
which doesn’t recognize the gesture. The window sends these same touches to the view attached to the
gesture recognizer.
2. The window sendstwo touch objectsin the Moved phase (UITouchPhaseMoved) to the gesture recognizer,
and the recognizer still doesn’t detect its gesture. The window then sends these touches to the attached
view.
Gesture Recognizers
Regulating the Delivery of Touches to Views
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
483. The window sends one touch object in the Ended phase (UITouchPhaseEnded) to the gesture recognizer.
This touch object doesn’t yield enough information for the gesture, but the window withholds the object
from the attached view.
4. The window sends the other touch object in the Ended phase. The gesture recognizer now recognizes its
gesture and so it sets its state to UIGestureRecognizerStateRecognized. Just before the first (or
only) action message issent, the view receives a touchesCancelled:withEvent: message to invalidate
the touch objects previously sent (in the Began and Moved phases). The touches in the Ended phase are
canceled.
Now assume that the gesture recognizer in the last step instead decides that this multitouch sequence it’s
been analyzing is not its gesture. It sets its state to UIGestureRecognizerStateFailed. The window then
sends the two touch objects in the Ended phase to the attached view in a touchesEnded:withEvent:
message.
A gesture recognizer for a continuous gesture goes through a similar sequence, except that it is more likely to
recognize its gesture before touch objectsreach the Ended phase. Upon recognizing its gesture, itsetsitsstate
to UIGestureRecognizerStateBegan. The window sends all subsequent touch objects in the multitouch
sequence to the gesture recognizer but not to the attached view.
Note: For a discussion of gesture-recognition states and possible transition between these states,
see “State Transitions” (page 50).
Affecting the Delivery of Touches to Views
You can change the values of three UIGestureRecognizer properties to alter the default delivery path of
touch objects to views in certain ways. These properties and their default values are:
cancelsTouchesInView (default of YES)
delaysTouchesBegan (default of NO)
delaysTouchesEnded (default of YES)
If you change the default values of these properties, you get the following differences in behavior:
● cancelsTouchesInView set to NO — Causes touchesCancelled:withEvent: to not be sent to the
view for any touches belonging to the recognized gesture. As a result, any touch objects in Began or
Moved phases previously received by the attached view are not invalidated.
● delaysTouchesBegan set to YES — Ensures that when a gesture recognizer recognizes a gesture, no
touch objects that were part of that gesture are delivered to the attached view. This setting provides a
behavior similar to that offered by the delaysContentTouches property on UIScrollView; in this
Gesture Recognizers
Regulating the Delivery of Touches to Views
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
49case, when scrolling begins soon after the touch begins, subviews of the scroll-view object never receive
the touch, so there is no flash of visual feedback. You should be careful about this setting because it can
easily make your interface feel unresponsive.
● delaysTouchesEnded set to NO — Prevents a gesture recognizer that's recognized its gesture after a
touch has ended from canceling that touch on the view. For example, say a view has a
UITapGestureRecognizer object attached with its numberOfTapsRequired set to 2, and the user
double-taps the view. If this property is set to NO, the view gets the following sequence of messages:
touchesBegan:withEvent:, touchesEnded:withEvent:, touchesBegan:withEvent:, and
touchesCancelled:withEvent:. With the property set to YES, the view gets
touchesBegan:withEvent:, touchesBegan:withEvent:, touchesCancelled:withEvent:, and
touchesCancelled:withEvent:. The purpose of this property is to ensure that a view won't complete
an action as a result of a touch that the gesture will want to cancel later.
Creating Custom Gesture Recognizers
If you are going to create a custom gesture recognizer, you need to have a clear understanding of how gesture
recognizers work. The following section gives you the architectural background of gesture recognition, and
the subsequent section goes into details of actually creating a gesture recognizer.
State Transitions
Gesture recognizers operate in a predefined state machine. They transition from one state to another depending
on whether certain conditions apply. The following enum constants from UIGestureRecognizer.h define
the states for gesture recognizers:
typedef enum {
UIGestureRecognizerStatePossible,
UIGestureRecognizerStateBegan,
UIGestureRecognizerStateChanged,
UIGestureRecognizerStateEnded,
UIGestureRecognizerStateCancelled,
UIGestureRecognizerStateFailed,
UIGestureRecognizerStateRecognized = UIGestureRecognizerStateEnded
} UIGestureRecognizerState;
Gesture Recognizers
Creating Custom Gesture Recognizers
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
50The sequence of states that a gesture recognizer may transition through varies, depending on whether a
discrete or continuous gesture is being recognized. All gesture recognizers start in the Possible state
(UIGestureRecognizerStatePossible). They then analyze the multitouch sequence targeted at their
attached hit-test view, and they either recognize their gesture or fail to recognize it. If a gesture recognizer
does not recognize its gesture, it transitions to the Failed state(UIGestureRecognizerStateFailed); this
is true of all gesture recognizers, regardless of whether the gesture is discrete or continuous.
When a gesture is recognized, however, the state transitions differ for discrete and continuous gestures. A
recognizer for a discrete gesture transitions from Possible to Recognized
(UIGestureRecognizerStateRecognized). A recognizer for a continuous gesture, on the other hand,
transitionsfrom Possible to Began (UIGestureRecognizerStateBegan) when it first recognizesthe gesture.
Then it transitionsfrom Began to Changed (UIGestureRecognizerStateChanged), and subsequently from
Changed to Changed every time there is a change in the gesture. Finally, when the last finger in the multitouch
sequence is lifted from the hit-test view, the gesture recognizer transitions to the Ended state
(UIGestureRecognizerStateEnded), which is an aliasfor the UIGestureRecognizerStateRecognized
state. A recognizer for a continuous gesture can also transition from the Changed state to a Cancelled state
(UIGestureRecognizerStateCancelled) if it determines that the recognized gesture no longer fits the
expected pattern for its gesture. Figure 3-3 illustrates these transitions.
Figure 3-3 Possible state transitions for gesture recognizers
Possible Began Changed Cancelled
Gesture cancelled — continuous gestures
Possible Began Changed Ended
Recognizes gestures — continuous gestures
Possible Recognized
Recognizes gesture — discrete gestures
Possible Failed
Fails to recognize gesture — all gesture recognizers
Gesture Recognizers
Creating Custom Gesture Recognizers
2011-03-10 | © 2011 Apple Inc. All Rights Reserved.
51Note: The Began, Changed, Ended, and Cancelled states are not necessarily associated with UITouch
objects in corresponding touch phases. They strictly denote the phase of the gesture itself, not the
touch objects that are being recognized.
When a gesture is recognized, every subsequent state transition causes an action message to be sent to the
target. When a gesture recognizer reaches the Recognized or Ended state, it is asked to reset its internal state
in preparation for a new attempt at recognizing the gesture. The UIGestureRecognizer class then sets the
gesture recognizer’s state back to Possible.
Implementing a Custom Gesture Recognizer
To implement a custom gesture recognizer, first create a subclass of UIGestureRecognizer in Xcode. Then,
add the following import directive in your subclass’s header file:
#import
elements.
If your breaks are specifically intended as line breaks and not paragraph breaks, then you should typically use
NSLineSeparatorCharacter. Otherwise, you may use \n, \r, or \r\n depending on what other software
is likely to process your text. The default choice for Cocoa is usually \n.
Separating a String “by Paragraph”
A common approach to separating a string “by paragraph” is simply to use:
NSArray *arr = [myString componentsSeparatedByString:@"\n"];
2012-07-17 | © 1997, 2012 Apple Inc. All Rights Reserved.
28
Paragraphs and Line BreaksThis, however, ignores the fact that there are a number of other ways in which a paragraph or line break may
be represented in a string—\r, \r\n, or Unicode separators. Instead you can use methods—such as
lineRangeForRange: or getParagraphStart:end:contentsEnd:forRange:—that take into account
the variety of possible line terminations, as illustrated in the following example.
NSString *string = /* assume this exists */;
unsigned length = [string length];
unsigned paraStart = 0, paraEnd = 0, contentsEnd = 0;
NSMutableArray *array = [NSMutableArray array];
NSRange currentRange;
while (paraEnd < length) {
[string getParagraphStart:¶Start end:¶End
contentsEnd:&contentsEnd forRange:NSMakeRange(paraEnd, 0)];
currentRange = NSMakeRange(paraStart, contentsEnd - paraStart);
[array addObject:[string substringWithRange:currentRange]];
}
Paragraphs and Line Breaks
Separating a String “by Paragraph”
2012-07-17 | © 1997, 2012 Apple Inc. All Rights Reserved.
29It's common to think of a string as a sequence of characters, but when working with NSString objects, or
with Unicode strings in general, in most cases it is better to deal with substrings rather than with individual
characters. The reason for this is that what the user perceives as a character in text may in many cases be
represented by multiple characters in the string. NSString has a large inventory of methods for properly
handling Unicode strings, which in general make Unicode compliance easy, but there are a few precautions
you should observe.
NSString objects are conceptually UTF-16 with platform endianness. That doesn't necessarily imply anything
about their internalstorage mechanism; what it meansisthat NSString lengths, character indexes, and ranges
are expressed in terms of UTF-16 units, and that the term “character” in NSString method names refers to
16-bit platform-endian UTF-16 units. This is a common convention for string objects. In most cases, clients
don't need to be overly concerned with this; aslong as you are dealing with substrings, the precise interpretation
of the range indexes is not necessarily significant.
The vast majority of Unicode code points used for writing living languages are represented by single UTF-16
units. However, some less common Unicode code points are represented in UTF-16 by surrogate pairs. A
surrogate pair is a sequence of two UTF-16 units, taken from specific reserved ranges, that together represent
a single Unicode code point. CFString has functions for converting between surrogate pairs and the UTF-32
representation of the corresponding Unicode code point. When dealing with NSString objects, one constraint
is that substring boundaries usually should not separate the two halves of a surrogate pair. This is generally
automatic for rangesreturned from most Cocoa methods, but if you are constructing substring ranges yourself
you should keep this in mind. However, this is not the only constraint you should consider.
In many writing systems, a single character may be composed of a base letter plus an accent or other decoration.
The number of possible letters and accents precludes Unicode from representing each combination as a single
code point, so in general such combinations are represented by a base character followed by one or more
combining marks. For compatibility reasons, Unicode does have single code points for a number of the most
common combinations; these are referred to as precomposed forms, and Unicode normalization transformations
can be used to convert between precomposed and decomposed representations. However, even if a string is
fully precomposed, there are still many combinations that must be represented using a base character and
combining marks. For most text processing, substring ranges should be arranged so that their boundaries do
not separate a base character from its associated combining marks.
2012-07-17 | © 1997, 2012 Apple Inc. All Rights Reserved.
30
Characters and Grapheme ClustersIn addition, there are writing systems in which characters represent a combination of parts that are more
complicated than accent marks. In Korean, for example, a single Hangul syllable can be composed of two or
three subparts known as jamo. In the Indic and Indic-influenced writing systems common throughout South
and Southeast Asia, single written characters often represent combinations of consonants, vowels, and marks
such as viramas, and the Unicode representations of these writing systems often use code points for these
individual parts,so that a single character may be composed of multiple code points. For most text processing,
substring ranges should also be arranged so that their boundaries do not separate the jamo in a single Hangul
syllable, or the components of an Indic consonant cluster.
In general, these combinations—surrogate pairs, base characters plus combining marks, Hangul jamo, and
Indic consonant clusters—are referred to as grapheme clusters. In order to take them into account, you can
use NSString’s rangeOfComposedCharacterSequencesForRange: or
rangeOfComposedCharacterSequenceAtIndex: methods, or
CFStringGetRangeOfComposedCharactersAtIndex. These can be used to adjuststring indexes orsubstring
ranges so that they fall on grapheme cluster boundaries, taking into account all of the constraints mentioned
above. These methods should be the default choice for programmatically determining the boundaries of
user-perceived characters.:
In some cases, Unicode algorithms deal with multiple charactersin waysthat go beyond even grapheme cluster
boundaries. Unicode casing algorithms may convert a single character into multiple characters when going
from lowercase to uppercase; for example, the standard uppercase equivalent of the German character “ß” is
the two-letter sequence “SS”. Localized collation algorithms in many languages consider multiple-character
sequences as single units; for example, the sequence “ch” is treated as a single letter for sorting purposes in
some European languages. In order to deal properly with cases like these, it is important to use standard
NSString methods for such operations as casing, sorting, and searching, and to use them on the entire string
to which they are to apply. Use NSString methods such as lowercaseString, uppercaseString,
capitalizedString, compare: and its variants, rangeOfString: and its variants, and
rangeOfCharacterFromSet: and its variants, or their CFString equivalents. These all take into account the
complexities of Unicode string processing, and the searching and sorting methods in particular have many
options to control the types of equivalences they are to recognize.
In some less common cases, it may be necessary to tailor the definition of grapheme clusters to a particular
need. The issues involved in determining and tailoring grapheme cluster boundaries are covered in detail in
Unicode Standard Annex #29, which gives a number of examples and some algorithms. The Unicode standard
in general is the best source for information about Unicode algorithms and the considerations involved in
processing Unicode strings.
If you are interested in grapheme cluster boundaries from the point of view of cursor movement and insertion
point positioning, and you are using the Cocoa text system, you should know that on OS X v10.5 and later,
NSLayoutManager has API support for determining insertion point positions within a line of text as it is laid
Characters and Grapheme Clusters
2012-07-17 | © 1997, 2012 Apple Inc. All Rights Reserved.
31out. Note that insertion point boundaries are not identical to glyph boundaries; a ligature glyph in some cases,
such as an “fi” ligature in Latin script, may require an internal insertion point on a user-perceived character
boundary. See Cocoa Text Architecture Guide for more information.
Characters and Grapheme Clusters
2012-07-17 | © 1997, 2012 Apple Inc. All Rights Reserved.
32An NSCharacterSet object represents a set of Unicode characters. NSString and NSScanner objects use
NSCharacterSet objects to group characters together for searching operations, so that they can find any of
a particular set of characters during a search.
Character Set Basics
A character set object represents a set of Unicode characters. Character sets are represented by instances of a
class cluster. The cluster’s two public classes, NSCharacterSet and NSMutableCharacterSet, declare the
programmatic interface for immutable and mutable character sets, respectively. An immutable character set is
defined when it is created and subsequently cannot be changed. A mutable character set can be changed
after it’s created.
A character set object doesn’t perform any tasks; it simply holds a set of character values to limit operations
on strings. The NSString and NSScanner classes define methods that take NSCharacterSet objects as
argumentsto find any ofseveral characters. For example, this code excerpt findsthe range of the first uppercase
letter in myString:.
NSString *myString = @"some text in an NSString...";
NSCharacterSet *characterSet = [NSCharacterSet uppercaseLetterCharacterSet];
NSRange letterRange = [myString rangeOfCharacterFromSet:characterSet];
After this fragment executes, letterRange.location is equal to the index of the first “N” in “NSString” after
rangeOfCharacterFromSet: isinvoked. If the first letter of the string were “S”, then letterRange.location
would be 0.
Creating Character Sets
NSCharacterSet defines class methodsthat return commonly used charactersets,such asletters(uppercase
or lowercase), decimal digits, whitespace, and so on. These “standard” character sets are always immutable,
even if created by sending a message to NSMutableCharacterSet. See “Standard Character Sets and Unicode
Definitions” (page 35) for more information on standard character sets.
2012-07-17 | © 1997, 2012 Apple Inc. All Rights Reserved.
33
Character SetsYou can use a standard character set as a starting point for building a custom set by making a mutable copy
of it and changing that. (You can also start from scratch by creating a mutable character set with alloc and
init and adding characters to it.) For example, this fragment creates a character set containing letters, digits,
and basic punctuation:
NSMutableCharacterSet *workingSet = [[NSCharacterSet alphanumericCharacterSet]
mutableCopy];
[workingSet addCharactersInString:@";:,."];
NSCharacterSet *finalCharacterSet = [workingSet copy];
To define a custom character set using Unicode code points, use code similar to the following fragment (which
creates a character set including the form feed and line separator characters):
UniChar chars[] = {0x000C, 0x2028};
NSString *string = [[NSString alloc] initWithCharacters:chars
length:sizeof(chars) / sizeof(UniChar)];
NSCharacterSet *characterSet = [NSCharacterSet
characterSetWithCharactersInString:string];
Performance considerations
Because character sets often participate in performance-critical code, you should be aware of the aspects of
their use that can affect the performance of your application. Mutable character sets are generally much more
expensive than immutable character sets. They consume more memory and are costly to invert (an operation
often performed in scanning a string). Because of this, you should follow these guidelines:
● Create as few mutable character sets as possible.
● Cache character sets (in a global dictionary, perhaps) instead of continually recreating them.
● When creating a custom set that doesn’t need to change after creation, make an immutable copy of the
final character set for actual use, and dispose of the working mutable character set. Alternatively, create
a character set file as described in “Creating a character set file” (page 35) and store it in your application’s
main bundle.
● Similarly, avoid archiving characterset objects;store them in characterset filesinstead. Archiving can result
in a character set being duplicated in different archive files, resulting in wasted disk space and duplicates
in memory for each separate archive read.
Character Sets
Performance considerations
2012-07-17 | © 1997, 2012 Apple Inc. All Rights Reserved.
34Creating a character set file
If your application frequently uses a custom character set, you should save its definition in a resource file and
load that instead of explicitly adding individual characters each time you need to create the set. You can save
a character set by getting its bitmap representation (an NSData object) and saving that object to a file:
NSData *charSetRep = [finalCharacterSet bitmapRepresentation];
NSURL *dataURL = <#URL for character set#>;
NSError *error;
BOOL result = [charSetRep writeToURL:dataURL options:NSDataWritingAtomic
error:&error];
By convention, characterset filenames use the extension .bitmap. If you intend for othersto use your character
set files, you should follow this convention. To read a character set file with a .bitmap extension, simply use
the characterSetWithContentsOfFile: method.
Standard Character Sets and Unicode Definitions
The standard character sets, such as that returned by letterCharacterSet, are formally defined in terms
of the normative and informative categories established by the Unicode standard, such as Uppercase Letter,
Combining Mark, and so on. The formal definition of a standard character set is in most cases given as one or
more of the categories defined in the standard. For example, the set returned by
lowercaseLetterCharacterSet include all characters in normative category Lowercase Letters, while the
set returned by letterCharacterSet includes the characters in all of the Letter categories.
Note that the definitions of the categoriesthemselves may change with new versions of the Unicode standard.
You can download the files that define category membership from http://www.unicode.org/.
Character Sets
Creating a character set file
2012-07-17 | © 1997, 2012 Apple Inc. All Rights Reserved.
35An NSScanner object scans the characters of an NSString object, typically interpreting the characters and
converting them into number and string values. You assign the scanner’s string on creation, and the scanner
progresses through the characters of that string from beginning to end as you request items.
Creating a Scanner
NSScanner is a class cluster with a single public class, NSScanner. Generally, you instantiate a scanner object
by invoking the class method scannerWithString: or localizedScannerWithString:. Either method
returns a scanner object initialized with the string you pass to it. The newly created scanner starts at the
beginning of its string. You scan components using the scan... methods such as scanInt:, scanDouble:,
and scanString:intoString:. If you are scanning multiple lines, you typically create a while loop that
continues until the scanner is at the end of the string, as illustrated in the following code fragment:
float aFloat;
NSScanner *theScanner = [NSScanner scannerWithString:aString];
while ([theScanner isAtEnd] == NO) {
[theScanner scanFloat:&aFloat];
// implementation continues...
}
You can configure a scanner to consider or ignore case using the setCaseSensitive: method. By default
a scanner ignores case.
Using a Scanner
Scan operationsstart at the scan location and advance the scanner to just past the last character in the scanned
value representation (if any). For example, after scanning an integer from the string “137 small cases of
bananas”, a scanner’s location will be 3, indicating the space immediately after the number. Often you need
to advance the scan location to skip characters in which you are not interested. You can change the implicit
2012-07-17 | © 1997, 2012 Apple Inc. All Rights Reserved.
36
Scannersscan location with the setScanLocation: method to skip ahead a certain number of characters (you can
also use the method to rescan a portion of the string after an error). Typically, however, you either want to
skip characters from a particular character set, scan past a specific string, or scan up to a specific string.
You can configure a scanner to skip a set of characters with the setCharactersToBeSkipped: method. A
scanner ignores characters to be skipped at the beginning of any scan operation. Once it finds a scannable
character, however, it includes all characters matching the request. Scanners skip whitespace and newline
characters by default. Note that case is always considered with regard to characters to be skipped. To skip all
English vowels, for example, you must set the characters to be skipped to those in the string “AEIOUaeiou”.
If you want to read content from the current location up to a particular string, you can use
scanUpToString:intoString: (you can pass NULL as the second argument if you simply want to skip the
intervening characters). For example, given the following string:
137 small cases of bananas
you can find the type of container and number of containers using scanUpToString:intoString: asshown
in the following example.
NSString *bananas = @"137 small cases of bananas";
NSString *separatorString = @" of";
NSScanner *aScanner = [NSScanner scannerWithString:bananas];
NSInteger anInteger;
[aScanner scanInteger:&anInteger];
NSString *container;
[aScanner scanUpToString:separatorString intoString:&container];
It is important to note that the search string (separatorString) is " of". By default a scanner ignores
whitespace, so the space character after the integer is ignored. Once the scanner begins to accumulate
characters, however, all characters are added to the output string until the search string is reached. Thus if the
search string is "of" (no space before), the first value of container is “small cases ” (includes the space
following); if the search string is " of" (with a space before), the first value of container is “small cases” (no
space following).
Scanners
Using a Scanner
2012-07-17 | © 1997, 2012 Apple Inc. All Rights Reserved.
37After scanning up to a given string, the scan location is the beginning of that string. If you want to scan past
thatstring, you must therefore firstscan in the string you scanned up to. The following code fragment illustrates
how to skip past the search string in the previous example and determine the type of product in the container.
Note the use of substringFromIndex: to in effect scan up to the end of a string.
[aScanner scanString:separatorString intoString:NULL];
NSString *product;
product = [[aScanner string] substringFromIndex:[aScanner scanLocation]];
// could also use:
// product = [bananas substringFromIndex:[aScanner scanLocation]];
Example
Suppose you have a string containing lines such as:
Product: Acme Potato Peeler; Cost: 0.98 73
Product: Chef Pierre Pasta Fork; Cost: 0.75 19
Product: Chef Pierre Colander; Cost: 1.27 2
The following example uses alternating scan operationsto extract the product names and costs(costs are read
as a float forsimplicity’ssake),skipping the expected substrings“Product:” and “Cost:”, as well asthe semicolon.
Note that because a scanner skips whitespace and newlines by default, the loop does no special processing
for them (in particular there is no need to do additional whitespace processing to retrieve the final integer).
NSString *string = @"Product: Acme Potato Peeler; Cost: 0.98 73\n\
Product: Chef Pierre Pasta Fork; Cost: 0.75 19\n\
Product: Chef Pierre Colander; Cost: 1.27 2\n";
NSCharacterSet *semicolonSet;
NSScanner *theScanner;
NSString *PRODUCT = @"Product:";
NSString *COST = @"Cost:";
NSString *productName;
float productCost;
Scanners
Example
2012-07-17 | © 1997, 2012 Apple Inc. All Rights Reserved.
38NSInteger productSold;
semicolonSet = [NSCharacterSet characterSetWithCharactersInString:@";"];
theScanner = [NSScanner scannerWithString:string];
while ([theScanner isAtEnd] == NO)
{
if ([theScanner scanString:PRODUCT intoString:NULL] &&
[theScanner scanUpToCharactersFromSet:semicolonSet
intoString:&productName] &&
[theScanner scanString:@";" intoString:NULL] &&
[theScanner scanString:COST intoString:NULL] &&
[theScanner scanFloat:&productCost] &&
[theScanner scanInteger:&productSold])
{
NSLog(@"Sales of %@: $%1.2f", productName, productCost * productSold);
}
}
Localization
A scanner bases some of its scanning behavior on a locale, which specifies a language and conventions for
value representations. NSScanner uses only the locale’s definition for the decimal separator (given by the key
named NSDecimalSeparator). You can create a scanner with the user’s locale by using
localizedScannerWithString:, or set the locale explicitly using setLocale:. If you use a method that
doesn’t specify a locale, the scanner assumes the default locale values.
Scanners
Localization
2012-07-17 | © 1997, 2012 Apple Inc. All Rights Reserved.
39NSString provides a rich set of methodsfor manipulating strings asfile-system paths. You can extract a path’s
directory, filename, and extension, expand a tilde expression (such as “~me”) or create one for the user’s home
directory, and clean up paths containing symbolic links, redundant slashes, and references to “.” (current
directory) and “..” (parent directory).
Note: Where possible, you should use instances of NSURL to represent paths—the operating system
deals with URLs more efficiently than with string representations of paths.
Representing a Path
NSString represents paths generically with ‘/’ asthe path separator and ‘.’ asthe extension separator. Methods
that accept strings as path arguments convert these generic representations to the proper system-specific
form as needed. On systems with an implicit root directory, absolute paths begin with a path separator or with
a tilde expression (“~/...” or “~user/...”). Where a device must be specified, you can do that
yourself—introducing a system dependency—or allow the string object to add a default device.
You can create a standardized representation of a path using stringByStandardizingPath. This performs
a number of tasks including:
● Expansion of an initial tilde expression;
● Reduction of empty components and references to the current directory (“//” and “/./”) to single path
separators;
●
In absolute paths, resolution of references to the parent directory (“..”) to the real parent directory;
for example:
NSString *path = @"/usr/bin/./grep";
NSString *standardizedPath = [path stringByStandardizingPath];
// standardizedPath: /usr/bin/grep
path = @"~me";
2012-07-17 | © 1997, 2012 Apple Inc. All Rights Reserved.
40
String Representations of File PathsstandardizedPath = [path stringByStandardizingPath];
// standardizedPath (assuming conventional naming scheme): /Users/Me
path = @"/usr/include/objc/..";
standardizedPath = [path stringByStandardizingPath];
// standardizedPath: /usr/include
path = @"/private/usr/include";
standardizedPath = [path stringByStandardizingPath];
// standardizedPath: /usr/include
User Directories
The following examples illustrate how you can use NSString’s path utilities and other Cocoa functions to get
the user directories.
// Assuming that users’ home directories are stored in /Users
NSString *meHome = [@"~me" stringByExpandingTildeInPath];
// meHome = @"/Users/me"
NSString *mePublic = [@"~me/Public" stringByExpandingTildeInPath];
// mePublic = @"/Users/me/Public"
You can find the home directory for the current user and for a given user with NSHomeDirectory and
NSHomeDirectoryForUser respectively:
NSString *currentUserHomeDirectory = NSHomeDirectory();
NSString *meHomeDirectory = NSHomeDirectoryForUser(@"me");
Note that you should typically use the function NSSearchPathForDirectoriesInDomains to locate standard
directories for the current user. For example, instead of:
NSString *documentsDirectory =
[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
String Representations of File Paths
User Directories
2012-07-17 | © 1997, 2012 Apple Inc. All Rights Reserved.
41you should use:
NSString *documentsDirectory;
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
NSUserDomainMask, YES);
if ([paths count] > 0) {
documentsDirectory = [paths objectAtIndex:0];
}
Path Components
NSString provides a rich set of methods for manipulating strings as file-system paths, for example:
Interprets the receiver as a path and returns the
receiver’s extension, if any.
pathExtension
Returns a new string made by deleting the
extension (if any, and only the last) from the
receiver.
stringByDeletingPathExtension
Returns a new string made by deleting the last
path component from the receiver, along with any
final path separator.
stringByDeletingLastPathComponent
Using these and related methods described in NSString Class Reference , you can extract a path’s directory,
filename, and extension, as illustrated by the following examples.
NSString *documentPath = @"~me/Public/Demo/readme.txt";
NSString *documentDirectory = [documentPath stringByDeletingLastPathComponent];
// documentDirectory = @"~me/Public/Demo"
NSString *documentFilename = [documentPath lastPathComponent];
// documentFilename = @"readme.txt"
NSString *documentExtension = [documentPath pathExtension];
// documentExtension = @"txt"
String Representations of File Paths
Path Components
2012-07-17 | © 1997, 2012 Apple Inc. All Rights Reserved.
42File Name Completion
You can find possible expansions of file names using
completePathIntoString:caseSensitive:matchesIntoArray:filterTypes:. For example, given
a directory ~/Demo that contains the following files:
ReadMe.txt readme.html readme.rtf recondite.txt test.txt
you can find all possible completions for the path ~/Demo/r as follows:
NSString *partialPath = @"~/Demo/r";
NSString *longestCompletion;
NSArray *outputArray;
unsigned allMatches = [partialPath completePathIntoString:&longestCompletion
caseSensitive:NO
matchesIntoArray:&outputArray
filterTypes:NULL];
// allMatches = 3
// longestCompletion = @"~/Demo/re"
// outputArray = (@"~/Demo/readme.html", "~/Demo/readme.rtf", "~/Demo/recondite.txt")
You can find possible completions for the path ~/Demo/r that have an extension “.txt” or “.rtf” as follows:
NSArray *filterTypes = @[@"txt", @"rtf"];
unsigned textMatches = [partialPath completePathIntoString:&outputName
caseSensitive:NO
matchesIntoArray:&outputArray
filterTypes:filterTypes];
// allMatches = 2
// longestCompletion = @"~/Demo/re"
// outputArray = (@"~/Demo/readme.rtf", @"~/Demo/recondite.txt")
String Representations of File Paths
File Name Completion
2012-07-17 | © 1997, 2012 Apple Inc. All Rights Reserved.
43You can draw string objects directly in a focused NSView using methods such as
drawAtPoint:withAttributes: (to draw a string with multiple attributes, such as multiple text fonts, you
must use an NSAttributedString object). These methods are described briefly in “Text” in Cocoa Drawing
Guide .
The simple methods, however, are designed for drawing small amounts of text or text that is only drawn
rarely—they create and dispose of various supporting objects every time you call them. To draw strings
repeatedly, it is more efficient to use NSLayoutManager, as described in “Drawing Strings”. For an overview of
the Cocoa text system, of which NSLayoutManager is a part, see Cocoa Text Architecture Guide .
2012-07-17 | © 1997, 2012 Apple Inc. All Rights Reserved.
44
Drawing StringsThis table describes the changes to String Programming Guide .
Date Notes
2012-07-17 Updated code snippets to adopt new Objective-C features.
Corrected string constant character set to UTF-8. Added guidance about
using localizedStandardCompare: for Finder-like sorting. Added caveat
to avoid using %s with RTL languages. Revised "String Format Specifiers"
article.
2012-06-11
2009-10-15 Added links to Cocoa Core Competencies.
Added new aricle on character clusters; updated list of string format
specifiers.
2008-10-15
2007-10-18 Corrected minor typographical errors.
Added notes regarding NSInteger and NSUInteger to "String Format
Specifiers".
2007-07-10
2007-03-06 Corrected minor typographical errors.
2007-02-08 Corrected sentence fragments and improved the example in "Scanners."
2006-12-05 Added code samples to illustrate searching and path manipulation.
2006-11-07 Made minor revisions to "Scanners" article.
2006-10-03 Added links to path manipulation methods.
2006-06-28 Corrected typographical errors.
Added a new article, "Reading Strings From and Writing Strings To Files
and URLs"; significantly updated "Creating and Converting Strings."
2006-05-23
2012-07-17 | © 1997, 2012 Apple Inc. All Rights Reserved.
45
Document Revision HistoryDate Notes
Included “Creating a Character Set” into “Character Sets” (page 33).
Changed title from "Strings" to conform to reference consistency
guidelines.
2006-01-10
Added “Formatting String Objects” (page 13) article. Added Data
Formatting and the Core Foundation Strings programming topics to the
introduction.
2004-06-28
Added information about custom Unicode character sets and retrieved
missing code fragments in “Creating a Character Set”. Added information
and cross-reference to “Drawing Strings” (page 44). Rewrote introduction
and added an index.
2004-02-06
Added NSNumericSearch description to “Searching, Comparing, and
Sorting Strings” (page 22).
2003-09-09
2003-03-17 Reinstated the sample code that was missing from “Scanners” (page 36).
Updated “Creating and Converting String Objects” (page 8) to
recommend the use of UTF8 encoding, and noted the pending deprecation
of the cString... methods.
2003-01-17
2002-11-12 Revision history was added to existing topic.
Document Revision History
2012-07-17 | © 1997, 2012 Apple Inc. All Rights Reserved.
46A
alloc method 34
archiving
character set objects 34
ASCII character encoding
converting string object contents 8
availableStringEncodings method 8
C
C strings
Cocoa string objects and 7
creating and converting 11
character encodings
string manipulation and 8
character sets
custom 34
example code 34
guidelines for use 34
mutable and immutable 33
saving to a file 35
standard 33, 35
characterAtIndex: method 7
characterSetWithContentsOfFile: method 35
compare: method 22
compare:options: method 22, 24
compare:options:range: method 22
comparing strings 22–23
comparison methods for strings 22
componentsSeparatedByString: method 11
current directories
resolving references to 40
D
dataUsingEncoding: method 11, 12
defaultCStringEncoding method 8
description method 13
descriptionWithLocale: method 13
directories
manipulating strings as paths 40, 42
E
encodings, character
string manipulation and 8
EUC character encoding 8
F
file-system paths and strings 42
format strings 13
G
getCharacters:length: method 12
I
init method
for mutable character sets 34
initWithData:encoding: method 8, 11, 12
initWithFormat: method 10
initWithFormat:locale: method 12
ISO Latin 1 character encoding 8
L
length method
2012-07-17 | © 1997, 2012 Apple Inc. All Rights Reserved.
47
Indexfor string objects 7
letterCharacterSet method 35
localization
scanning strings and 39
value formatting and 13
localizedScannerWithString: method 36, 39
localizedStringWithFormat: method 9, 12
lowercaseLetterCharacterSet method 35
M
myString: method 33
N
NSCharacterSet class 33
NSLayoutManager class 44
NSMutableCharacterSet class 33
NSMutableString class 7, 8
NSScanner class 23, 36–38
NSString class
creating string objects from 8
described 7
methods for representing file-system paths 40
scanners and 36
NSView class 44
P
parent directories
resolving references to 40
paths and strings 42
primitive methods
of NSString 7
printf function
NSString and 13
R
rangeOfCharacterFromSet: method 22, 33
rangeOfCharacterFromSet:options: method 22
rangeOfCharacterFromSet:options:range:
method 22
rangeOfComposedCharacterSequenceAtIndex:
method 23
rangeOfString: method 22
rangeOfString:options: method 22
rangeOfString:options:range: method 22
S
scan... methods 36
scanners 36, 38
instantiating 36
operation of 36
sample code 38
scannerWithString: method 36
scanUpToString:intoString: method 37
search methods
for strings 22
setCaseSensitive: method 36
setCharactersToBeSkipped: method 37
setLocale: method 39
setScanLocation: method 37
Shift-JIS character encoding 8
standard character sets 33, 35
string objects
combining and extracting 10
comparison methods 22
creating and converting 8–12
described 7
drawing 44
searching and comparing 22–23
stringByAppendingFormat: method 10, 12
stringByAppendingString: method 10, 12
stringWithCharacters:length: method 12
stringWithContentsOfFile: method 21
stringWithFormat: method 10
stringWithUTF8String: method 12
substringFromIndex: method 11
substringToIndex: method 11
Index
2012-07-17 | © 1997, 2012 Apple Inc. All Rights Reserved.
48substringWithRange: method 11
U
Unicode
characters in string objects 8
code points used to define character sets 34
in string objects 7
NSCharacterSet and 33
standard character sets 35
string comparison standard 22
UTF8 character encoding 11
UTF8String method 11, 12
V
value formatting
string conversion and 13
W
writeToFile:atomically: method 21
Index
2012-07-17 | © 1997, 2012 Apple Inc. All Rights Reserved.
49Apple Inc.
© 1997, 2012 Apple Inc.
All rights reserved.
No part of this publication may be reproduced,
stored in a retrievalsystem, or transmitted, in any
form or by any means, mechanical, electronic,
photocopying, recording, or otherwise, without
prior written permission of Apple Inc., with the
following exceptions: Any person is hereby
authorized to store documentation on a single
computer for personal use only and to print
copies of documentation for personal use
provided that the documentation contains
Apple’s copyright notice.
No licenses, express or implied, are granted with
respect to any of the technology described in this
document. Apple retains all intellectual property
rights associated with the technology described
in this document. This document is intended to
assist application developers to develop
applications only for Apple-labeled computers.
Apple Inc.
1 Infinite Loop
Cupertino, CA 95014
408-996-1010
Apple, the Apple logo, Cocoa, Finder, Mac,
Macintosh, Objective-C, OS X, and Safari are
trademarks of Apple Inc., registered in the U.S.
and other countries.
Even though Apple has reviewed this document,
APPLE MAKES NO WARRANTY OR REPRESENTATION,
EITHER EXPRESS OR IMPLIED, WITH RESPECT TO THIS
DOCUMENT, ITS QUALITY, ACCURACY,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR
PURPOSE.ASARESULT, THISDOCUMENT IS PROVIDED
“AS IS,” AND YOU, THE READER, ARE ASSUMING THE
ENTIRE RISK AS TO ITS QUALITY AND ACCURACY.
IN NO EVENT WILL APPLE BE LIABLE FOR DIRECT,
INDIRECT, SPECIAL, INCIDENTAL,OR CONSEQUENTIAL
DAMAGES RESULTING FROM ANY DEFECT OR
INACCURACY IN THIS DOCUMENT, even if advised of
the possibility of such damages.
THE WARRANTY AND REMEDIES SET FORTH ABOVE
ARE EXCLUSIVE AND IN LIEU OF ALL OTHERS, ORAL
OR WRITTEN, EXPRESS OR IMPLIED. No Apple dealer,
agent, or employee is authorized to make any
modification, extension, or addition to this warranty.
Some states do not allow the exclusion or limitation
of implied warranties or liability for incidental or
consequential damages, so the above limitation or
exclusion may not apply to you. This warranty gives
you specific legal rights, and you may also have other
rights which vary from state to state.
Apple AirPort Networks2
1 Contents
Chapter 1 3 Getting Started
5 Configuring an Apple Wireless Device for Internet Access Using AirPort Utility
6 Extending the Range of Your AirPort Network
6 Sharing a USB Hard Disk Connected to an AirPort Extreme Base Station or Time Capsule
6 Printing with an Apple Wireless Device
6 Sharing Your Computer’s Internet Connection
Chapter 2 9 AirPort Security
9 Security for AirPort Networks at Home
10 Security for AirPort Networks in Businesses and Classrooms
11 Wi-Fi Protected Access (WPA) and WPA2
Chapter 3 14 AirPort Network Designs
15 Using AirPort Utility
17 Setting Up the AirPort Extreme Network
24 Configuring and Sharing Internet Access
41 Setting Advanced Options
43 Extending the Range of an 802.11n Network
45 Keeping Your Network Secure
49 Directing Network Traffic to a Specific Computer on Your Network (Port Mapping)
51 Logging
52 Using Back to My Mac on your Wireless Network
53 Setting up IPv6
54 Sharing and Securing USB Hard Disks on Your Network
55 Using a Time Capsule in Your Network
55 Connecting a USB Printer to an Apple Wireless Device
56 Adding a Wireless Client to Your 802.11n Network
57 Solving Problems
Chapter 4 59 Behind the Scenes
59 Basic Networking
63 Items That Can Cause Interference with AirPort
Glossary 641
3
1 Getting Started
AirPort offers the easiest way to provide wireless Internet
access and networking anywhere in the home, classroom,
or office.
AirPort is based on the latest Institute of Electrical and Electronics Engineers (IEEE)
802.11n draft specification and provides fast and reliable wireless networking in the
home, classroom, or small office. You can enjoy data transfer rates of up to five times
faster than data rates provided by the 802.11g standard and more than twice the
network range.
The new AirPort Extreme Base Station and the new Time Capsule are based on
simultaneous dual-band technology, so they work in both the 2.4 gigahertz (GHz)
or 5 GHz spectrum at the same time. And they are 100 percent backward-compatible,
so Mac computers and PCs that use 802.11a, 802.11b, 802.11g, or IEEE draft specification
802.11n wireless cards can connect to an AirPort wireless network. They also work
flawlessly with the AirPort Express for wireless music streaming and more. The
AirPort Extreme Base Station and Time Capsule have three additional 10/100/1000BaseT Gigabit Ethernet ports, so you don’t need to include another router in your network.
To set up an AirPort Extreme Base Station, an AirPort Express, or a Time Capsule, you
use AirPort Utility, the easy-to-use setup and management application. AirPort Utility
has a simple user experience, with all software controls accessible from the same
application. It provides better management of several Apple wireless devices, with
client-monitoring features and logging.
If you’re using AirPort Utility version 5.4 or later, you can set up a guest network, in
both the 2.4 GHz and 5 GHz bands, so that guests can connect to the Internet using
your AirPort network, while you keep your private network secure. You can also choose
to set up guest accounts that expire, to grant temporary access to your network; you
no longer need to give your network password to visitors in your home or office.
You can even set up accounts with time constraints for the best in parental controls.
AirPort Utility supports IPv6 and Bonjour, so you can “advertise” network services such
as printing and sharing a hard disk over the Wide Area Network (WAN) port.4 Chapter 1 Getting Started
Note: When the features discussed in this document apply to the AirPort Extreme Base
Station, AirPort Express, and Time Capsule, the devices are referred to collectively as
Apple wireless devices.
With an AirPort Extreme Base Station or a Time Capsule, you can connect a USB hard
disk so that everyone on the network can back up, store, and share files. Every
Time Capsule includes an internal AirPort disk, so you don’t need to connect an
external one. If you want, you can connect additional USB disks to the USB port on
your Time Capsule. You can also connect a USB printer to the USB port on any
Apple wireless device, so that everyone on the network can access the printer or hub.
All Apple wireless devices provide strong, wireless security. They offer a built-in firewall
and support industry-standard encryption technologies. Yet the simple setup utility
and powerful access controls make it easy for authorized users to connect to the
AirPort network they create.
You can use an Apple wireless device to provide wireless Internet access and share a
single Internet connection among several computers in the following ways:
 Set up the device to act as a router and provide Internet Protocol (IP) addresses to
computers on the network using Dynamic Host Configuration Protocol (DHCP) and
Network Address Translation (NAT). When the wireless device is connected to a DSL
or cable modem that is connected to the Internet, it receives webpages and email
content from the Internet through its Internet connection, and then sends the
content to wireless-enabled computers, using the wireless network or using Ethernet
if there are computers connected to the Ethernet ports.
 Set up the Apple wireless device to act as a bridge on an existing network that
already has Internet access and a router providing IP addresses. The device passes
IP addresses and the Internet connection to AirPort or wireless-enabled computers,
or computers connected to the wireless device by Ethernet.
This document provides information about the latest AirPort Extreme Base Station,
AirPort Express, and Time Capsule, and detailed information about designing 802.11n
networks with AirPort Utility for computers using Mac OS X v10.5 or later, and
Windows Vista or Windows XP with Service Pack 2. If you’re using previous versions of
Mac OS X, or are setting up earlier versions of AirPort devices, you’ll find more
information at www.apple.com/support/airport.Chapter 1 Getting Started 5
You can set up an Apple wireless device and connect to the Internet wirelessly in
minutes. But because Apple wireless devices are flexible and powerful networking
products, you can also create an AirPort network that does much more. If you want to
design an AirPort network that provides Internet access to non-AirPort computers via
Ethernet, or take advantage of some of your wireless device’s more advanced features,
use this document to design and implement your network. You can find more general
wireless networking information and an overview of AirPort technology in the earlier
AirPort documents, located at www.apple.com/support/manuals/airport.
Note: The images of AirPort Utility in this document are from Mac OS X v10.5. If you’re
using a Windows computer, the images you see in this document may be slightly
different from what you see on your screen.
Configuring an Apple Wireless Device for Internet Access
Using AirPort Utility
Like your computer, Apple wireless devices must be set up with the appropriate
hardware and IP networking information to connect to the Internet. Install
AirPort Utility, which came on the CD with your wireless device, and use it to provide
Internet configuration information and other network settings.
AirPort Utility combines the ease of use of AirPort Setup Assistant and the power of
AirPort Admin Utility. It is installed in the Utilities folder in the Applications folder on
a Macintosh computer using Mac OS X, and in Start > All Programs > AirPort on
computers using Windows. AirPort Utility walks you through the setup process by
asking a series of questions to determine how the device’s Internet connection and
other interfaces should be set up. Enter the settings you received from your ISP or
network administrator for Ethernet, PPP over Ethernet (PPPoE), or your local area
network (LAN); give your AirPort network a name and password; set up a device as
a wireless bridge to extend the range of your existing AirPort network; and set other
options.
When you’ve finished entering the settings, AirPort Utility transfers the settings to your
wireless device. Then it connects to the Internet and shares its Internet connection with
computers that join its AirPort network.
You can also create an AirPort network that takes advantage of the more advanced
networking features of Apple wireless devices. To set more advanced AirPort options,
use AirPort Utility to manually set up your wireless device’s configuration, or make
quick adjustments to one you’ve already set up. Some of the AirPort advanced
networking features can be configured only using the manual setup features in
AirPort Utility. 6 Chapter 1 Getting Started
Set up your Apple wireless device manually using AirPort Utility when:
 You want to provide Internet access to computers that connect to the wireless device
using Ethernet
 you’ve already set up your device, but you need to change one setting, such as your
account information
 You need to configure advanced settings such as channel frequency, advanced
security options, closed networks, DHCP lease time, access control, WAN privacy,
power controls, or port mapping or other options
For instructions on using AirPort Utility to manually set up your wireless device and
network, see “Using AirPort Utility” on page 15.
Extending the Range of Your AirPort Network
You can extend the range of your network by using AirPort Utility to set up wireless
connections among several devices in your network, or to connect a device using
Ethernet to create a roaming network. For more information on extending the range of
your network, see “Connecting Additional Wireless Devices to Your AirPort Network” on
page 41.
Sharing a USB Hard Disk Connected to an AirPort Extreme
Base Station or Time Capsule
If you’re using an AirPort Extreme Base Station or a Time Capsule, you can connect a
USB hard disk to it, and computers connected to the network—wired or wireless, Mac
or Windows—can share files using the hard disk. Every Time Capsule includes an
internal AirPort disk, so you don’t need to connect an external one. If you want, you can
connect additional USB disks to the USB port on your Time Capsule. See “Sharing and
Securing USB Hard Disks on Your Network” on page 54.
Printing with an Apple Wireless Device
If you have a compatible USB printer connected to your Apple wireless device,
computers on the AirPort network can use Bonjour (Apple’s zero-configuration
networking technology) to print to the printer. For instructions about printing to a
USB printer from a computer, see “Connecting a USB Printer to an Apple Wireless
Device” on page 55.
Sharing Your Computer’s Internet Connection
If your computer is connected to the Internet, you can share your Internet connection
with other computers using Mac OS X version 10.2 or later, or Windows XP with Service
Pack 2. This is sometimes called using your computer as a software base station.Chapter 1 Getting Started 7
You can share your Internet connection as long as your computer is connected to the
Internet. If your computer goes to sleep or is restarted, or if you lose your Internet
connection, you need to restart Internet sharing.
To start Internet sharing on a computer using Mac OS X v10.5 or later:
1 Open System Preferences and click Sharing.
2 Choose the port you want to use to share your Internet connection from the “Share
your connection using” pop-up menu.
3 Select the port you want to use to share your Internet connection in the “To computers
using” list. You can choose to share your Internet connection with AirPort-enabled
computers or computers with built-in Ethernet, for example.
4 Select Internet Sharing in the Services list.
5 If you want to share your Internet connection with computers using AirPort, click
AirPort Options to give your network a name and password. 8 Chapter 1 Getting Started
To start Internet sharing on a computer using Windows:
1 Open Control Panel from the Start menu, and then click “Network and Internet.”
2 Click “Network and Sharing Center.”
3 Click “Manage network connections” in the Tasks list.
4 Right-click the network connection you want to share, and then select Properties.
5 Click Sharing and then select “Allow other network users to connect through this
computer’s Internet connection.”
Note: If your Internet connection and your local network use the same port (built-in
Ethernet, for example), contact your ISP before you turn on Internet sharing. In some
cases (if you use a cable modem, for example) you might unintentionally affect the
network settings of other ISP customers, and your ISP might terminate your service to
prevent you from disrupting its network.
The following chapters explain AirPort security options, AirPort network design and
setup, and other advanced options.2
9
2 AirPort Security
This chapter provides an overview of the security features
available in AirPort.
Apple has designed its wireless devices to provide several levels of security, so
you can enjoy peace of mind when you access the Internet, manage online financial
transactions, or send and receive email. The AirPort Extreme Base Station and
Time Capsule also include a slot for inserting a lock to deter theft.
For information and instructions for setting up these security features, see “Setting Up
the AirPort Extreme Network” on page 17.
Security for AirPort Networks at Home
Apple gives you ways to protect your wireless AirPort network as well as the data that
travels over it.
NAT Firewall
You can isolate your wireless network with firewall protection. Apple wireless devices
have a built-in Network Address Translation (NAT) firewall that creates a barrier
between your network and the Internet, protecting data from Internet-based IP attacks.
The firewall is automatically turned on when you set up the device to share a single
Internet connection. For computers with a cable or DSL modem, AirPort can actually be
safer than a wired connection.
Closed Network
Creating a closed network keeps the network name and the very existence of your
network private. Prospective users of your network must know the network name
and password to access it. Use AirPort Utility, located in the Utilities folder in the
Applications folder on a Macintosh computer using Mac OS X, or in Start > All
Programs > AirPort on a computer using Windows, to create a closed network.10 Chapter 2 AirPort Security
Password Protection and Encryption
AirPort uses password protection and encryption to deliver a level of security
comparable to that of traditional wired networks. Users can be required to enter a
password to log in to the AirPort network. When transmitting data and passwords,
the wireless device uses up to 128-bit encryption, through either Wi-Fi Protected Access
(WPA), WPA2, or Wired Equivalent Privacy (WEP), to scramble data and help keep
it safe. If you’re setting up an 802.11n-based AirPort device, you can also use WEP
(Transitional Security Network) if both WEP-compatible and WPA/WPA2-compatible
computers will join your network.
Note: WPA security is available only to AirPort Extreme wireless devices; AirPort and
AirPort Extreme clients using Mac OS X 10.3 or later and AirPort 3.3 or later; and to
non-Apple clients using other 802.11 wireless adapters that support WPA. WPA2
security requires firmware version 5.6 or later for an AirPort Extreme Base Station,
firmware version 6.2 or later for an AirPort Express, firmware version 7.3 or later for a
Time Capsule, and a Macintosh computer with an AirPort Extreme wireless card using
AirPort 4.2 or later. If your computer uses Windows XP or Windows Vista, check the
documentation that came with your computer to see if your computer supports WPA2.
Security for AirPort Networks in Businesses and Classrooms
Businesses and schools need to restrict network communications to authorized users
and keep data safe from prying eyes. To meet this need, Apple wireless devices and
software provide a robust suite of security mechanisms. Use AirPort Utility to set up
these advanced security features.
Transmitter Power Control
Because radio waves travel in all directions, they can extend outside the confines of a
specific building. The Transmit Power setting in AirPort Utility lets you adjust the
transmission range of your device’s network. Only users within the network vicinity
have access to the network.
MAC Address Access Control
Every AirPort and wireless card have a unique Media Access Control (MAC) address.
For AirPort Cards and AirPort Extreme Cards, the MAC address is sometimes referred to
as the AirPort ID. Support for MAC address access control lets administrators set up a
list of MAC addresses and restrict access to the network to only those users whose MAC
addresses are in the access control list.Chapter 2 AirPort Security 11
RADIUS Support
The Remote Authentication Dial-In User Service (RADIUS) makes securing a large
network easy. RADIUS is an access control protocol that allows a system administrator
to create a central list of the user names and passwords of computers that can access
the network. Placing this list on a centralized server allows many wireless devices to
access the list and makes it easy to update. If the MAC address of a user’s computer
(which is unique to each 802.11 wireless card) is not on your approved MAC address list,
the user cannot join your network.
Wi-Fi Protected Access (WPA) and WPA2
There has been increasing concern about the vulnerabilities of WEP. In response, the
Wi-Fi Alliance, in conjunction with the IEEE, has developed enhanced, interoperable
security standards called Wi-Fi Protected Access (WPA) and WPA2.
WPA and WPA2 use specifications that bring together standards-based, interoperable
security mechanisms that significantly increase the level of data protection and access
control for wireless LANs. WPA and WPA2 provide wireless LAN users with a high-level
assurance that their data remains protected and that only authorized network users
can access the network. A wireless network that uses WPA or WPA2 requires all
computers that access the wireless network to have WPA or WPA2 support. WPA
provides a high level of data protection and (when used in Enterprise mode) requires
user authentication.
The main standards-based technologies that constitute WPA include Temporal Key
Integrity Protocol (TKIP), 802.1X, Message Integrity Check (MIC), and Extensible
Authentication Protocol (EAP).
TKIP provides enhanced data encryption by addressing the WEP encryption
vulnerabilities, including the frequency with which keys are used to encrypt the
wireless connection. 802.1X and EAP provide the ability to authenticate a user on
the wireless network.
802.1X is a port-based network access control method for wired as well as wireless
networks. The IEEE adopted 802.1X as a standard in August 2001.
The Message Integrity Check (MIC) is designed to prevent an attacker from capturing
data packets, altering them, and resending them. The MIC provides a strong
mathematical function in which the receiver and the transmitter each compute and
then compare the MIC. If they do not match, the data is assumed to have been
tampered with and the packet is dropped. If multiple MIC failures occur, the network
may initiate countermeasures.12 Chapter 2 AirPort Security
The EAP protocol known as TLS (Transport Layer Security) presents a user’s information
in the form of digital certificates. A user’s digital certificates can comprise user names
and passwords, smart cards, secure IDs, or any other identity credentials that the IT
administrator is comfortable using. WPA uses a wide variety of standards-based EAP
implementations, including EAP-Transport Layer Security (EAP-TLS), EAP-Tunnel
Transport Layer Security (EAP-TTLS), and Protected Extensible Authentication Protocol
(PEAP). AirPort Extreme also supports the Lightweight Extensible Authentication
Protocol (LEAP), a security protocol used by Cisco access points to dynamically assign a
different WEP key to each user. AirPort Extreme is compatible with Cisco’s LEAP security
protocol, enabling AirPort users to join Cisco-hosted wireless networks using LEAP.
In addition to TKIP, WPA2 supports the AES-CCMP encryption protocol. Based on the
very secure AES national standard cipher, combined with sophisticated cryptographic
techniques, AES-CCMP was specifically designed for wireless networks. Migrating from
WEP to WPA2 requires new firmware for the AirPort Extreme Base Station (version 5.6 or
later), and for AirPort Express (version 6.2 or later). Devices using WPA2 mode are not
backward compatible with WEP.
WPA and WPA2 have two modes:
 Personal mode, which relies on the capabilities of TKIP or AES-CCMP without
requiring an authentication server
 Enterprise mode, which uses a separate server, such as a RADIUS server, for user
authentication
WPA and WPA2 Personal
 For home or Small Office/Home Office (SOHO) networks, WPA and WPA2 operates in
Personal mode, taking into account that the typical household or small office does
not have an authentication server. Instead of authenticating with a RADIUS server,
users manually enter a password to log in to the wireless network. When a user
enters the password correctly, the wireless device starts the encryption process using
TKIP or AES-CCMP. TKIP or AES-CCMP takes the original password and derives
encryption keys mathematically from the network password. The encryption key is
regularly changed and rotated so that the same encryption key is never used twice.
Other than entering the network password, the user isn’t required to do anything to
make WPA or WPA2 Personal work in the home.Chapter 2 AirPort Security 13
WPA and WPA2 Enterprise
WPA is a subset of the draft IEEE 802.11i standard and effectively addresses the wireless
local area network (WLAN) security requirements for the enterprise. WPA2 is a full
implementation of the ratified IEEE 802.11i standard. In an enterprise with IT resources,
WPA should be used in conjunction with an authentication server such as RADIUS to
provide centralized access control and management. With this implementation in
place, the need for add-on solutions such as virtual private networks (VPNs) may be
eliminated, at least for securing wireless connections in a network.
For more information about setting up a WPA or WPA2 protected network, see
“Using Wi-Fi Protected Access” on page 45.3
14
3 AirPort Network Designs
This chapter provides overview information and instructions
for the types of AirPort Extreme networks you can set up, and
some of the advanced options of AirPort Extreme.
Use this chapter to design and set up your AirPort Extreme network.
Configuring your Apple wireless device to implement a network design requires
three steps:
Step 1: Setting Up the AirPort Extreme Network
Computers communicate with the wireless device over the AirPort wireless network.
When you set up the AirPort network created by the wireless device, you can name the
wireless network, assign a password that will be needed to join the wireless network,
and set other options.
Step 2: Configuring and Sharing Internet Access
When computers access the Internet through the AirPort Extreme network, the wireless
device connects to the Internet and transmits information to the computers over the
AirPort Extreme network. You provide the wireless device with settings appropriate for
your ISP and configure how the device shares this connection with other computers.
Step 3: Setting Advanced Options
These settings are optional for most users. They include using the Apple wireless device
as a bridge between your AirPort Extreme network and an Ethernet network, setting
advanced security options, extending the AirPort network to other wireless devices,
and fine-tuning other settings.
For specific instructions on all these steps, refer to the sections later in this chapter.
You can do most of your setup and configuration tasks using AirPort Utility, and
following the onscreen instructions to enter your ISP and network information. To set
advanced options, you need to use AirPort Utility to manually set up your Apple
wireless device and AirPort network.Chapter 3 AirPort Network Designs 15
Using AirPort Utility
To set up and configure your computer or Apple wireless device to use AirPort Extreme
for basic wireless networking and Internet access, use AirPort Utility and answer
a series of questions about your Internet settings and how you would like to set up
your network.
1 Open AirPort Utility, located in the Utilities folder in the Applications folder on a Mac,
or in Start > All Programs > AirPort on a Windows computer.
2 Select your device in the list on the left if there is more than one device in your
network. Click Continue, and then follow the onscreen instructions to enter the settings
from your ISP or network administrator for the type of network you want to set up. See
the network diagrams later in this chapter for the types of networks you can set up
using AirPort Utility.
To set up a more complicated network, or to make adjustments to a network you’ve
already set up, use the manual setup features in AirPort Utility.
Setting AirPort preferences
Use AirPort preferences to set up your wireless device to alert you when there are
updates available for your device. You can also set it up to notify you if there are
problems detected, and to provide instructions to help solve the problems.
To set AirPort preferences:
1 Open AirPort Utility, located in the Utilities folder inside the Applications folder on
a Mac, and in Start > All Programs > AirPort on a Windows computer.
2 Do one of the following:
 On a Mac, choose AirPort Utility > Preferences
 On a Windows computer, choose File > Preferences16 Chapter 3 AirPort Network Designs
Select from the following checkboxes:
 Select “Check for Updates when opening AirPort Utility” to automatically check the
Apple website for software and firmware updates each time you open AirPort Utility.
 Select the “Check for updates” checkbox, and then choose a time interval from the
pop-up menu, such as weekly, to check for software and firmware updates in the
background. AirPort Utility opens if updates are available.
 Select “Monitor Apple wireless devices for problems” to investigate problems that
may cause the device’s status light to blink amber. With the checkbox selected,
AirPort Utility opens if a problem is detected, and then provides instructions to help
resolve the problem. This option monitors all of the wireless devices on the network.
 Select “Only Apple wireless devices that I have configured” to monitor only the
devices you’ve set up using this computer.
Monitoring devices for problems requires an AirPort wireless device that supports
firmware version 7.0 or later.
To set up your wireless device manually:
1 Open AirPort Utility, located in the Utilities folder in the Applications folder on a Mac, or
in Start > All Programs > AirPort on a Windows computer.
2 Select your device in the list.
3 Choose Base Station > Manual Setup and enter the password if necessary. The default
device password is public.
If you don’t see your wireless device in the list:
1 Open the AirPort status menu in the menu bar on a Mac and make sure that you’ve
joined the AirPort network created by your wireless device. On a Windows computer,
hover the cursor over the wireless network icon in the status tray to make sure the
computer is connected to the correct network.
The default network name for an Apple wireless device is AirPort Network XXXXXX,
where XXXXXX is replaced with the last six digits of the AirPort ID, (or MAC address).
The AirPort ID is printed on the bottom of Apple wireless devices.
2 Make sure your computer’s network and TCP/IP settings are configured properly.
On a computer using Mac OS X, choose AirPort from the Show pop-up menu in the
Network pane of System Preferences. Then choose Using DHCP from the Configure IPv4
pop-up menu in the TCP/IP pane.
On a computer using Windows, right-click the wireless connection icon that displays
the AirPort network, and choose Status. Click Properties, select Internet Protocol
(TCP/IP), and then click Properties. Make sure “Obtain an IP address automatically” is
selected.Chapter 3 AirPort Network Designs 17
If you can’t open the wireless device settings:
1 Make sure your network and TCP/IP settings are configured properly.
On a computer using Mac OS X, select AirPort from the network connection services list
in the Network pane of System Preferences. Click Advanced, and then choose Using
DHCP from the Configure IPv4 pop-up menu in the TCP/IP pane.
On a computer using Windows, right-click the wireless connection icon that displays
the AirPort network, and choose Status. Click Properties, select Internet Protocol
(TCP/IP), and then click Properties. Make sure “Obtain an IP address automatically”
is selected.
2 Make sure you entered the wireless device password correctly. The default password
is public. If you’ve forgotten the device password, you can reset it to public by resetting
the device.
To temporarily reset the device password to public, hold down the reset button for one
second. To reset the device back to its default settings, hold the reset button for five full
seconds.
If you’re on an Ethernet network that has other devices, or you’re using Ethernet to
connect to the device:
AirPort Utility scans the Ethernet network to create the list of devices. As a result, when
you open AirPort Utility, you may see devices that you cannot configure.
Setting Up the AirPort Extreme Network
The first step in configuring your Apple wireless device is setting up the device and the
network it will create. You can set up most features using AirPort Utility and following
the onscreen instructions to enter the information from your ISP or network
administrator.
To configure a network manually or set advanced options, open your wireless device’s
configuration in AirPort Utility and manually set up your device and network.
1 Choose the network of the wireless device you want to configure from the AirPort
status menu on a computer using Mac OS X, or from the wireless connection icon in
the status tray on a computer using Windows.
2 Open AirPort Utility and select the wireless device from the list. If you don’t see the
device you want to configure, click Rescan to scan for available wireless devices, and
then select the one you want from the list. 18 Chapter 3 AirPort Network Designs
3 Choose Base Station > Manual Setup and enter the password if necessary. The default
device password is public.
You can also double-click the name of the wireless device to open its configuration in
a separate window. When you open the manual setup window, the Summary pane is
displayed. The summary pane provides information and status about your wireless
device and network.Chapter 3 AirPort Network Designs 19
If the wireless device reports a problem, the status icon turns yellow. Click Base Station
Status to display the problem and suggestions to resolve it.
Wireless Device Settings
Click the AirPort button, and then click Base Station or Time Capsule, depending on the
device you’re setting up, to enter information about the wireless device.
Give the Device a Name
Give the device an easily identifiable name. This makes it easy for administrators
to locate a specific device on an Ethernet network with several devices.
Change the Device Password
The device password protects its configuration so that only the administrator can
modify it. The default password is public. It is a good idea to change the device
password to prevent unauthorized changes to it.
If the password is not changed from public, you’ll not be prompted for a password
when you select it from the list and click Configure.
Other Information
 Allow configuration over the WAN port. This allows you to administer the wireless
device remotely.
 Advertise the wireless device over the Internet using Bonjour. If you have an account
with a dynamic DNS service, you can connect to it over the Internet.
 Set the device time automatically. If you have access to a Network Time Protocol
server, whether on your network or on the Internet, choose it from the pop-up menu.
This ensures your wireless device is set to the correct time.20 Chapter 3 AirPort Network Designs
Set Device Options
Click Base Station Options and set the following:
 Enter a contact name and location for the wireless device. The name and location are
included in some logs the device generates. The contact and location fields may be
helpful if you’ve more than one wireless device on your network.
 Set status light behavior to either Always On or Flash On Activity. If you choose Flash
On Activity, the device status light blinks when there is network traffic.
 If your wireless device supports it, select “Check for firmware updates” and choose an
increment, such as Daily from the pop-up menu.
Wireless Network Settings
Click Wireless, and enter the network name, radio mode, and other wireless
information.
Setting the Wireless Mode
AirPort Extreme supports two wireless modes:
 Create a wireless network. Choose this option if you’re creating a new
AirPort Extreme network.
 Extend a wireless network. Choose this option if you plan to connect another Apple
wireless device to the network you’re setting up.
Naming the AirPort Extreme Network
Give your AirPort network a name. This name appears in the AirPort status menu on the
AirPort-enabled computers that are in range of your AirPort network.Chapter 3 AirPort Network Designs 21
Choosing the Radio Mode
Choose 802.11a/n - 802.11b/g from the Radio Mode pop-up menu if computers with
802.11a, 802.11n, 802.11g, or 802.11b wireless cards will join the network. Each client
computer will connect to the network and transmit network traffic at the highest
possible speed.
Choose 802.11n - 802.11b/g if only computers with 802.11n, 802.11b, or 802.11g
compatible wireless cards will join the network.
Note: If you don’t want to use an 802.11n radio mode, hold down the Option key and
chose a radio mode that doesn’t include 802.11n.
Changing the Channel
The “channel” is the radio frequency over which your wireless device communicates.
If you use only one device (for example, at home), you probably won’t need to change
the channel frequency. If you set up several wireless devices in a school or office,
use different channel frequencies for devices that are within approximately 150 feet of
each other.
Adjacent wireless devices should have at least 4 channels between their channel
frequencies. So if device A is set to channel 1, device B should be set to channel 6 or 11.
For best results, use channels 1, 6, or 11 when operating your device in the 2.4 GHz
range.
Choose Manually from the Radio Channel Selection pop-up menu, and then click Edit
to set the channels manually.
AirPort-enabled computers automatically tune to the channel frequency your wireless
device is using when they join the AirPort network. If you change the channel
frequency, AirPort client computers do not need to make any changes.
Password-protect Your Network
To password-protect your network, you can choose from a number of wireless security
options. In the AirPort pane of AirPort Utility, click Wireless and choose one of the
following options from the Wireless Security pop-up menu:
 None: Choosing this option turns off all password protection for the network. Any
computer with a wireless adapter or card can join the network, unless the network is
set up to use access control. See “Setting Up Access Control” on page 47.
 WEP: If your device supports it, choose this option and enter a password to protect
your network with a Wired Equivalent Privacy (WEP) password. Your Apple wireless
device supports 40-bit and 128-bit encryption. To use 40-bit WEP, don’t use an
802.11n radio mode.22 Chapter 3 AirPort Network Designs
 WPA/WPA2 Personal: Choose this option to protect your network with Wi-Fi
Protected Access. You can use a password between 8 and 63 ASCII characters or a
Pre-Shared Key of exactly 64 hexadecimal characters. Computers that support WPA
and computers that support WPA2 can join the network. Choose WPA2 Personal if
you want only computers that support WPA2 to join your network.
 WPA/WPA2 Enterprise: Choose this option if you’re setting up a network that
includes an authentication server, such as a RADIUS server, with individual user
accounts. Enter the IP address and port number for the primary and optional
secondary server, and enter a “shared secret,” which is the password for the server.
Choose WPA2 Enterprise if you want only computers that support WPA2 to join the
network.
 WEP (Transitional Security Network): If your device supports it, you can use this
option to allow computers using WPA or WPA2 to join the network. Computers or
devices that use WEP can also join the network. WEP (Transitional Security Network)
supports 128-bit encryption. To use this option, the wireless device use an 802.11n
radio mode. Hold the Option key on your keyboard while clicking the Wireless
Security pop-up menu to use WEP (Transitional Security Netowrk).
For more information and instructions for setting up WPA or WPA2 on your network,
see “Using Wi-Fi Protected Access” on page 45.
Setting Wireless Options
Click Wireless Options to set additional options for your network.Chapter 3 AirPort Network Designs 23
Setting Additional Wireless Options
Use the Wireless Options pane to set the following:
 5 GHz network name: Provide a name for the 5 GHz segment of the dual-band
network if you want it to have a different name than the 2.4 GHz network.
 Country: Choose the country for the location of your network from the Country
pop-up menu.
 Multicast rate: Choose a multicast rate from the pop-up menu. If you set the
multicast rate high, only clients on the network that are within range and can
achieve the speed you set will receive transmissions.
 Transmit power: Choose a setting from the Transmit Power pop-up menu to set the
network range (the lower the percentage, the shorter the network range).
 WPA Group Key Timeout: Enter a number in the text field, and choose an increment
from the pop-up menu to change the frequency of key rotation.
 Use Wide Channels: If you set up your network to use the 5 GHz frequency range,
you can use wide channels to provide higher network throughput.
Note: Using wide channels is not permitted in some countries.
 Create a closed network: Selecting a closed network hides the name of the
network so that users must enter the exact network name and password to join
the AirPort Extreme network.
 Use interference robustness: Interference robustness can solve interference
problems caused by other devices or networks.
To set more advanced security options, see “Keeping Your Network Secure” on page 45.24 Chapter 3 AirPort Network Designs
Setting up a Guest Network
Click Guest Network and then enter the network name and other options for the guest
network. When you set up a guest network, a portion of your connection to the
Internet is reserved for “guests”, wireless clients that can join the guest network and
connect to the Internet without accessing your private network.
Select “Allow guest network clients to communicate with each other” to allow client
computers to share files and services with each other while they’re connected to the
guest network. Make sure sharing services are set up on the client computers.
Configuring and Sharing Internet Access
The next step is setting up your wireless device’s Internet connection and sharing its
Internet access with client computers. The following sections tell you what to do,
depending on how your device connects to the Internet.
You’re Using a DSL or Cable Modem
In most cases, you can implement this network design using AirPort Utility and
following the onscreen instructions to set up your wireless device and network. You
need to use AirPort Utility to manually set up your device only if you want to set up
or adjust optional advanced settings.Chapter 3 AirPort Network Designs 25
What It Looks Like
How It Works
 The Apple wireless device (in this example, a Time Capsule) connects to the Internet
through its Internet WAN (<) connection to your DSL or cable modem.
 Computers using AirPort or computers connected to the wireless device’s Ethernet
LAN port (G) connect to the Internet through the device.
 The device is set up to use a single, public IP address to connect to the Internet, and
uses DHCP and NAT to share the Internet connection with computers on the network
using private IP addresses.
 AirPort computers and Ethernet computers communicate with one another through
the wireless device.
Important: Connect Ethernet computers that are not connected to the Internet to
the device’s LAN port (G) only. Since the device can provide network services, you
must set it up carefully to avoid interfering with other services on your Ethernet
network.
What You Need for a DSL or Cable Modem Connection
DSL or cable modem
to Internet
to Ethernet port
Time Capsule
< Ethernet WAN port
2.4 or 5 GHz
Components Check Comments
Internet account with DSL or
cable modem service provider
Does your service provider use a
static IP or DHCP configuration?
You can get this information
from your service provider or the
Network preferences pane on
the computer you use to access
the Internet through this service
provider.
Apple wireless device (an AirPort
Extreme Base Station, an AirPort
Express, or a Time Capsule)
Place the device near your DSL
or cable modem.26 Chapter 3 AirPort Network Designs
What to Do
If you’re using AirPort Utility to assist you with configuring the Apple wireless device
for Internet access:
1 Open AirPort Utility, located in the Utilities folder in the Applications folder on a Mac,
or in Start > All Programs > AirPort on a Windows computer.
2 Follow the onscreen instructions and enter the settings you received from your service
provider to connect to the Internet, and then set up the device to share the Internet
connection with computers on the network.
If you’re using AirPort Utility to manually set up your wireless device:
1 Make sure that your DSL or cable modem is connected to the Ethernet WAN port (<)
on your Apple wireless device.
2 Open AirPort Utility, located in the Utilities folder in the Applications folder on a Mac,
or in Start > All Programs > AirPort on a Windows computer. Select your wireless device
and choose Base Station > Manual Setup, or double-click your device’s icon in the list to
open the configuration in a separate window.
3 Click the Internet button. Click Internet Connection and choose Ethernet or PPPoE from
the Connect Using pop-up menu, depending on which one your service provider
requires. If your service provider gave you PPPoE connection software, such as EnterNet
or MacPoET, choose PPPoE.
Note: If you’re connecting to the Internet through a router using PPPoE and your Apple
wireless device is connected to the router via Ethernet, you do not need to use PPPoE
on your wireless device. Choose Ethernet from the Connect Using pop-up menu in the
Internet pane, and deselect the “Distribute IP addresses” checkbox in the Network
pane. Contact your service provider if you aren’t sure which one to select.
4 Choose Manually or Using DHCP from the Configure IPv4 pop-up menu if you chose
Ethernet from the Connect Using pop-up menu, depending on how your service
provider provides IP addresses.
 If your provider gave you an IP address and other numbers with your subscription,
use that information to configure the wireless device IP address manually. If you
aren’t sure, ask your service provider. Enter the IP address information in the fields
below the Configure IPv4 pop-up menu.Chapter 3 AirPort Network Designs 27
 If you chose PPPoE, your ISP provides your IP address automatically using DHCP.
If your service provider asks you for the MAC address of your wireless device, use the
address of the Ethernet WAN port (<), printed on the label on the bottom of the
device.
If you’ve already used AirPort Utility to set up your wireless device, the fields below the
Configure IPv4 pop-up menu may already contain the information appropriate for your
service provider.
You can change the WAN Ethernet speed if you have specific requirements for the
network you’re connected to. In most cases, the settings that are configured
automatically are correct. Your service provider should be able to tell you if you need
to adjust these settings.
Changing the WAN Ethernet speed can affect the way the wireless device interacts with
the Internet. Unless your service provider has given you specific settings, use the
automatic settings. Entering the wrong settings can affect network performance.
Contact your service
provider for the
information you should
enter in these fields.
Use this pop-up menu
if you need to adjust
the speed of the
Ethernet WAN port.28 Chapter 3 AirPort Network Designs
If you configure TCP/IP using DHCP, choose Using DHCP from the Configure IPv4
pop-up menu. Your IP information is provided automatically by your ISP using DHCP.
5 If you chose PPPoE from the Connect Using pop-up menu, enter the PPPoE settings
your service provider gave you. Leave the Service Name field blank unless your service
provider requires a service name.
Note: With AirPort, you don’t need to use a third-party PPPoE connection application.
You can connect to the Internet using AirPort.
Your service provider
may require you to
enter information
in these fields.
Contact your
service provider
for the information
you should enter
in these fields.Chapter 3 AirPort Network Designs 29
If you’re connecting to the Internet through a router that uses PPPoE to connect to the
Internet, and your wireless device is connected to the router via Ethernet, you do not
need to use PPPoE on your device. Choose Ethernet from the Connect Using pop-up
menu in the Internet pane, and deselect the “Distribute IP addresses” checkbox in the
Network pane. Because your router is distributing IP addresses, your wireless device
doesn’t need to. More than one device on a network providing IP addresses can cause
problems.
6 Click PPPoE to set PPPoE options for your connection.
 Choose Always On, Automatic, or Manual, depending on how you want to control
when your wireless device is connected to the Internet.
If you choose Always On, your device stays connected to your modem and the
Internet as long as the modem is turned on. If you choose Automatic, the wireless
device connects to the modem, which connects to the Internet when you use an
application that requires an Internet connection, such as email or an instant message
or web application. If you choose Manual, you need to connect the modem to the
Internet when you use an application that requires an Internet connection.
If you chose Automatic or Manual from the Connection pop-up menu, you need to
choose an increment, such as “10 minutes,” from the “Disconnect if idle” pop-up
menu. If you don’t use an Internet application after the increment of time has passed,
you’ll be disconnected from the Internet.
Note: If your wireless device is connected to your modem using an Ethernet LAN
port, and your modem is connected to the Internet using PPPoE, you may not be
able to use the manual setting.30 Chapter 3 AirPort Network Designs
 Enter Domain Name System (DNS) server addresses and a specific domain name your
wireless device accesses when you connect to the Internet.
7 Click the Network button and configure how the device will share its Internet access
with AirPort and Ethernet computers.
If you chose Ethernet from the Connect Using pop-up menu, choose how your device
will share the Internet connection from the Connection Sharing pop-up menu.
 To share a single Internet connection with AirPort computers and computers
connected to the device with Ethernet using DHCP and NAT, choose “Share a public
IP address” from the Connection Sharing pop-up menu. Using DHCP and NAT lets the
wireless device dynamically and automatically assign IP addresses to client
computers, which simplifies each computer’s TCP/IP configuration. See “Setting
DHCP and NAT Options” on page 31.
By default, the wireless device allows other devices, computers using Ethernet, and
computers using AirPort to communicate with each other using non-IP protocols like
AppleTalk. If you want to connect an AppleTalk Ethernet printer to the Apple wireless
device or use AppleTalk between wired and wireless computers, make sure the
devices are connected to the Ethernet LAN port (G) on the device.
 To distribute a range of IP addresses using only DHCP, choose “Distribute a range of
IP addresses.” See “Setting DHCP Only Options” on page 33.Chapter 3 AirPort Network Designs 31
 If you don’t want your wireless device to share its IP address, choose “Off (Bridge
Mode).” If you set up your device in bridge mode, AirPort computers have access to
all services on the Ethernet network, and the device does not provide Internet
sharing services. See “You’re Using an Existing Ethernet Network” on page 37 for
more information about setting up your wireless device as a bridge.
Using the wireless device as a bridge can be a way to address incompatibilities
between the device’s Internet sharing features and your ISP’s connection method.
Setting DHCP and NAT Options
If you chose “Share a public IP address” from the Connection Sharing pop-up menu,
you can set DHCP and NAT options. Click DHCP.
 Choose a range of IP addresses from the DHCP Range pop-up menu. Choose 10.0,
192.168, or 172.16 and then enter a beginning and ending address in the DHCP
Beginning Address and the DHCP Ending Address fields, depending on which
addresses you want the wireless device to provide.
 Enter a number in the DHCP Lease field, and then choose minutes, hours, or days
from the pop-up menu.
 Type a welcome message in the DHCP Message field. This message is displayed when
a computer joins your network.
 If your network is set up to use a Lightweight Directory Access Protocol (LDAP) server
on your network, you can enter the address of the server in the LDAP Server field,
and computers on your network will have access to it.32 Chapter 3 AirPort Network Designs
 To provide specific IP addresses to specific computers on your wireless network,
click the Add (+) button below the DHCP Reservations list, and follow the onscreen
instructions to name the reservation and reserve the address by MAC address or
DHCP client ID. If you choose MAC address, click Continue and enter the MAC
address and specific IP address.
Next you can set NAT options for the network. Click NAT.
 You can set up a default host on your network. A default host (sometimes known as
a DMZ) is a computer on your network that is exposed to the Internet and receives
all inbound traffic. A default host may be useful if you use a computer on your
AirPort network to play network games, or want to route all Internet traffic through
a single computer.
 You can set up NAT Port Mapping Protocol (NAT-PMP). NAT-PMP is an Internet
Engineering Task Force Internet Draft, an alternative to the more common Universal
Plug and Play (UPnP) protocol implemented in many network address translation
(NAT) routers. NAT-PMP allows a computer in a private network (behind a NAT router)
to automatically configure the router to allow parties outside the private network to
contact this computer.
Included in the protocol is a method for retrieving the public IP address of a NAT
gateway, allowing a client to make this public IP address and port number known to
peers that may wish to communicate with it. This protocol is implemented in current
Apple products, including Mac OS X 10.4 Tiger and later, AirPort Extreme, AirPort
Express, and Time Capsule networking products, and Bonjour for Windows.Chapter 3 AirPort Network Designs 33
You can also set up port mapping. To ensure that requests are properly routed to your
web, AppleShare, or FTP server, or a specific computer on your network, you need to
establish a permanent IP address for the server or computer, and provide “inbound port
mapping” information to the Apple wireless device. See “Directing Network Traffic to a
Specific Computer on Your Network (Port Mapping)” on page 49.
Setting DHCP Only Options
If you chose “Distribute a range of IP addresses” from the Connection Sharing pop-up
menu, your wireless device is set up to use DHCP to distribute a range of IP addresses
using only DHCP. You cannot use NAT if you chose this option. Click DHCP and enter
the beginning and ending addresses you want to distribute to computers joining your
wireless network.
You can set the additional DHCP options, such as DHCP Lease, DHCP Message, and
other options following the instructions above.
Setting Up Client Computers
To configure TCP/IP on client computers using Mac OS X v10.5:
1 Open System Preferences on the client computer and then click Network.
2 Do one of the following:
a If the client computer is using AirPort, select AirPort in the network connection
services list, and then click Advanced.34 Chapter 3 AirPort Network Designs
Next, choose DHCP from the Configure IPv4 pop-up menu.
b If you enabled a DHCP server when you set up the wireless device’s network, and the
client computer is using Ethernet, select Ethernet in the network connection services
list, and then choose Using DHCP from the Configure pop-up menu.Chapter 3 AirPort Network Designs 35
c If you selected “Distribute a range of IP addresses” when you set up the wireless
device’s network, you can provide Internet access to client computers using
Ethernet by setting the client IP addresses manually. Select Ethernet in the
network connection services list, and then choose Manually from the Configure
pop-up menu.
When you configure Ethernet clients manually for a wireless device that provides
NAT over Ethernet, you can use IP addresses in the range 10.0.1.2 to 10.0.1.200.
In the Subnet Mask field, enter 255.255.255.0. In the Router field, enter 10.0.1.1.
Enter the same name server address and search domain information that you
entered in the wireless device configuration.
To configure TCP/IP on client computers using Windows
Make sure you’ve installed the wireless adapter in your computer and the software
necessary to set up the adapter.
To configure TCP/IP on client computers:
1 Open Control Panel from the Start menu, and then click “Network and Internet.”
2 Click “Network and Sharing Center.”
3 Click “Manage network connections” in the Tasks list.
4 Right-click the wireless connection you want to share, and then select Properties.
Enter the IP and router
addresses from the range
your device is providing.
Enter the DNS and Search
Domain addresses if
necessary.36 Chapter 3 AirPort Network Designs
5 Click Internet Protocol Version 4 (TCP/IPv4), and then click Properties.
 If you chose “Share a public IP address” in the Network pane of AirPort Utility, select
“Obtain an IP address automatically.”
 If you chose “Distribute a range of IP addresses” when you set up the wireless device’s
network, you can provide Internet access to client computers by setting the client IP
addresses manually. Select “Use the following IP address.”
When you configure clients manually for a wireless device that provides NAT service,
use IP addresses in the range 10.0.1.2 to 10.0.1.200, 172.16.1.2 to 172.16.1.200, or
192.168.1.2 to 192.168.1.200.
In the “Subnet mask” field, enter 255.255.255.0. In the “Default gateway” field, enter
10.0.1.1, 172.16.1.1, or 192.168.1.1, depending on which addressing scheme you used. Enter
the same name server address and search domain information that you entered in the
wireless device configuration.Chapter 3 AirPort Network Designs 37
You’re Using an Existing Ethernet Network
You can use AirPort Utility to easily set up the Apple wireless device for Internet access
through an existing Ethernet network that already has a router, switch, or other
network device providing IP addresses. Use the manual setup features of AirPort Utility
if you need to adjust optional advanced settings.
What It Looks Like
How It Works
 The Apple wireless device (in this example, a Time Capsule) uses your Ethernet
network to communicate with the Internet through the Ethernet WAN port (<).
 AirPort and Ethernet clients access the Internet and the Ethernet network through
the Apple wireless device.
What You Need for an Ethernet Connection
Router
to Internet
to Ethernet port
Time Capsule