Apple ipad_manual_del_usuario.pdf Manuel Apple sur Fnac.com - Pour voir la liste complète des manuels APPLE, cliquez ici

 

 

TELECHARGER LE PDF sur :

http://manuals.info.apple.com/es_MX/ipad_manual_del_usuario.pdf

Commander un produit Apple sur Fnac.com

 

 

Voir également d'autres Guides APPLE :

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-Lecteur-Optique-Manuel

Apple-Carte-AirPort-Manuel

Apple-iPhone_Finger_Tips_Guide.pdf-Anglais-Manuel

Apple-Couvercle-Manuel

Apple-battery.cube.pdf-Manuel

Apple-Boitier-de-l-ordinateur-Manuel

Apple-Pile-Interne-Manuel

Apple-atacable.pdf-Manuel

Apple-videocard.pdf-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-iOS_Business.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-IntroductionXserve1.0.1

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-F034-2262AXerve-grappe

Apple-Mac_OS_X_Server_Glossaire_10.5

Apple-FRLogic_Pro_7_Guide_TDM

Apple-iphone_bluetooth_headset_userguide

Apple-Administration_des_services_reseau_10.5

Apple-imacg5_17inch_harddrive

Apple-iPod_nano_4th_gen_Manuale_utente

Apple-iBook-G4-Getting-Started

Apple-XsanGettingStarted

Apple-Mac_mini_UG-Early2006

Apple-Guide_des_fonctionnalites_de_l_iPod_classic

Apple-Guide_de_configuration_d_Xsan_2

Apple-MacBook_Late2006_UsersGuide

Apple-sur-Fnac.com

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-FRLogic_Pro_7_Guide_TDM

Apple-airportextreme_802.11n_userguide

Apple-iPod_shuffle_3rdGen_UG

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-imacG5_20inch_AirPort

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-Shake_4_User_Manual

Apple-aluminumAppleKeyboard_wireless2007_UserGuide

Apple-ipod_shuffle_features_guide

Apple-Color-User-Manual

Apple-XsanGettingStarted

Apple-Migration_10.4_2e_Ed

Apple-MacBook_Air_SuperDrive

Apple-MacBook_Late2007-f

ApplePowerMacG5_(Early_2005)_UserGuide

Apple-iSightUserGuide

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-eMac_2005UserGuide

Apple-imacg5_20inch_Inverter

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-StoreKitGuide.pdf-Japon

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-Mail_Service_v10.4.pdf

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-System_Image_Admin.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-AirMac-カード取り付け手順-Japon

Apple-iPhone開発ガイド-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_Component_AV_Cable.pdf

Apple-DVD_Studio_Pro_4_Installation_de_votre_logiciel

Apple-Windows_Services

Apple-Motion_3_New_Features_F

Apple-g4mdd-fw800-lowerfan

Apple-MacOSX10.3_Welcome

Apple-Print_Service

Apple-Xserve_Setup_Guide_F

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-boot_camp_install-setup

Apple-iBookG3_14inchUserGuideMultilingual

Apple-mac_pro_server_mid2010_ug_f

Apple-Motion_Supplemental_Documentation

Apple-imac_mid2011_ug_f

Apple-iphone_guide_de_l_utilisateur

Apple-macbook_air_11inch_mid2011_ug_fr

Apple-NouvellesfonctionnalitesdeLogicExpress7.2

Apple-QT_Streaming_Server

Apple-Web_Technologies_Admin

Apple-Mac_Pro_Early2009_4707_UG

Apple-guide_de_l_utilisateur_de_Numbers08

Apple-Decouverte_d_Aperture_2

Apple-Guide_de_configuration_et_d'administration

Apple-mac_integration_basics_fr_106.

Apple-iPod_shuffle_4thgen_Guide_de_l_utilisateur

Apple-ARA_Japan

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-RemoteSupportJP

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-Open_Directory.pdf

Apple-Nike_+_iPod_User_guide

Apple-ard_admin_guide_2.2_fr.pdf

Apple-systemoverviewj.pdf-Japon

Apple-Xserve_TO_J070411.pdf-Japon

Apple-Mac_Pro_User_Guide.pdf

Apple-iMacG5_iSight_UG.pdf

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-Logic_Pro_8.0_lbn_j.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-iMac_Mid2010_UG_BR.pdf

Apple-iMac_Late2009_UG_J.pdf

Apple-iphone_user_guide-For-iOS-6-Software

Apple-iDVD5_Getting_Started.pdf

Apple-guide_des_fonctionnalites_de_l_ipod_touch.pdf

Apple_iPod_touch_User_Guide

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_upute_za_uporabu

Apple_ipad_user_guide_ta

Apple_iPod_touch_User_Guide

apple_earpods_user_guide

apple_iphone_gebruikershandleiding

apple_iphone_5_info

apple_iphone_brukerhandbok

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-iMac_G5_de_lutilisateur

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

Liste-documentation-apple

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-Color_1.0_User_Manual_F

Apple-guide_de_configuration_airport_express_4.2

Apple-TimeCapsule_SetupGuide

Apple-Instruments_et_effets_Logic_Express_8

Apple-Manuel_de_l_utilisateur_de_WaveBurner

Apple-Macmini_Guide_de_l'utilisateur

Apple-PowerMacG5_UserGuide

Disque dur, ATA parallèle Instructions de remplacement

Apple-final_cut_pro_x_logic_effects_ref_f

Apple-Leopard_Installationshandbok

Manuale Utente PowerBookG4

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

AppleTV_Setup-Guide

Apple-livetype_2_user_manual_f

Apple-imacG5_17inch_harddrive

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-Workgroup-Server-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

iPad Manual del usuario Para software de iOS 6Contenido 7 Capítulo 1: Visión general 7 Presentación del iPad 8 Accesorios 9 Botones 11 Bandeja de la tarjeta SIM 12 Iconos de estado 14 Capítulo 2: Introducción 14 Requisitos necesarios 14 Configuración del iPad 14 ID de Apple 15 Configuración del correo y otras cuentas 15 Cómo gestionar el contenido del iPad 16 Cómo usar iCloud 17 Conexión del iPad al ordenador 18 Sincronización con iTunes 19 Visualización del manual del usuario en el iPad 20 Capítulo 3: Nociones básicas 20 Uso de las apps 23 Personalización del iPad 25 Escritura 29 Dictado 30 Cómo buscar 31 Notificaciones 32 Compartir 33 Conexión del iPad a un televisor u otro dispositivo 34 Impresión con AirPrint 35 Dispositivos Bluetooth 36 Compartir Archivos 37 Funciones de seguridad 38 Batería 39 Capítulo 4: Siri 39 ¿Qué es Siri? 39 Cómo utilizar Siri 42 Restaurantes 43 Películas 43 Deportes 43 Dictado 44 Cómo corregir a Siri 245 Capítulo 5: Safari 48 Capítulo 6: Mail 48 Lectura de correo electrónico 49 Envío de correo electrónico 50 Organización del correo 51 Impresión de mensajes y archivos adjuntos 51 Cuentas de correo y ajustes de Mail 53 Capítulo 7: Mensajes 53 Cómo enviar y recibir mensajes 54 Gestión de conversaciones 54 Cómo enviar fotos, vídeos y otros contenidos 55 Ajustes de mensajes 56 Capítulo 8: FaceTime 58 Capítulo 9: Cámara 58 Visión general 59 Cómo ver, compartir e imprimir 60 Edición de fotos y recorte de vídeos 61 Capítulo 10: Fotos 61 Cómo visualizar fotos y vídeos 62 Cómo organizar fotos y vídeos 62 Fotos en streaming 64 Cómo compartir fotos y vídeos 64 Impresión de fotos 64 Marco de fotos 65 Cómo importar fotos y vídeos 66 Capítulo 11: Photo Booth 66 Hacer fotos 67 Gestionar fotos 68 Capítulo 12: Vídeos 70 Capítulo 13: Calendario 70 Visión general 71 Cómo trabajar con varios calendarios 72 Compartir calendarios de iCloud 72 Ajustes de Calendario 73 Capítulo 14: Contactos 73 Visión general 74 Cómo añadir contactos 75 Ajustes de Contactos 76 Capítulo 15: Notas 76 Visión general Contenido 377 Capítulo 16: Recordatorios 79 Capítulo 17: Reloj 80 Capítulo 18: Mapas 80 Cómo buscar ubicaciones 81 Obtención de indicaciones 82 3D y Flyover 82 Ajustes de Mapas 83 Capítulo 19: Música 83 Obtención de música 83 Reproducción de música 85 Podcasts y audiolibros 85 Listas de reproducción 85 Genius 86 Siri 87 iTunes Match 87 la función “Compartir en casa” 88 Ajustes de Música 89 Capítulo 20: La tienda iTunes Store 91 Capítulo 21: La tienda App Store 91 Visión general 92 Eliminación de apps 93 Capítulo 22: Quiosco 94 Capítulo 23: iBooks 94 Visión general 95 Lectura de libros 96 Interacción con objetos multimedia 96 Estudio de notas y listas de vocabulario 97 Organización de la estantería 97 Sincronización de libros y documentos PDF 98 Impresión o envío de un PDF por correo electrónico 98 Ajustes de iBooks 99 Capítulo 24: Podcasts 101 Capítulo 25: Game Center 101 Visión general 102 Cómo jugar con amigos 102 Ajustes de Game Center 103 Capítulo 26: Accesibilidad 103 Funciones de accesibilidad 103 VoiceOver 113 Siri 113 Clic triple en Inicio 113 Zoom Contenido 4114 Texto grande 114 Invertir colores 114 Leer selección 114 Leer texto automático 114 Audio mono 115 Tonos asignables 115 Acceso Guiado 115 AssistiveTouch 116 Accesibilidad en OS X 116 Tamaño de letra mínimo para los mensajes de Mail 116 Teclados panorámicos 116 Con subtítulos 117 Capítulo 27: Ajustes 117 Modo Avión 117 Wi-Fi 118 VPN 118 Compartir Internet 119 Bluetooth 119 Datos móviles 120 “No molestar” y notificaciones 121 General 126 Sonidos 126 Brillo y fondo de pantalla 126 Marco de fotos 127 Privacidad 128 Apéndice A: El iPad en la empresa 128 El iPad en la empresa 128 Uso de perfiles de configuración 128 Configuración de cuentas de Microsoft Exchange 129 Acceso a una red VPN 129 Cuentas LDAP y CardDAV 130 Apéndice B: Teclados internacionales 130 Uso de teclados internacionales 131 Métodos de entrada especiales 133 Apéndice C: Seguridad, manejo y soporte 133 Información importante sobre seguridad 135 Información importante sobre manejo 136 Soporte del iPad 136 Aparece una imagen de batería baja o el mensaje “No se está cargando” 137 El iPad no responde 137 Reinicio y restauración del iPad 137 Aparece “Código incorrecto” o “El iPad está deshabilitado” 137 Aparece “Este accesorio no es compatible con el iPad” 137 Una app no ocupa toda la pantalla 138 No aparece el teclado en pantalla 138 Realización de copias de seguridad del iPad 140 Actualización y restauración del software del iPad Contenido 5140 Envío, recepción o visualización de correos electrónicos 142 Sonido, música y vídeo 143 Las tiendas iTunes Store y App Store 144 Más información, servicio y soporte 144 Información sobre residuos y reciclaje 146 Apple y el medio ambiente Contenido 61 7 En este capítulo encontrará información acerca de las características del iPad, el funcionamiento de sus controles y muchas cosas más. Presentación del iPad iPad mini Pantalla Multi-Touch Pantalla Multi-Touch Cámara FaceTime Cámara FaceTime Inicio Inicio Iconos de apps Iconos de apps Barra de estado Barra de estado Conector Lightning Conector Lightning Altavoz Altavoz Micrófono Micrófono Salida de auriculares Salida de auriculares Reposo/ activación Reposo/ activación Cámara iSight Cámara iSight Subir/ bajar volumen Subir/ bajar volumen Bandeja de la tarjeta nano-SIM (en algunos modelos) Bandeja de la tarjeta nano-SIM (en algunos modelos) Interruptor lateral Interruptor lateral Visión generalCapítulo 1 Visión general 8 iPad Pantalla Multi-Touch Pantalla Multi-Touch Cámara FaceTime Cámara FaceTime Inicio Inicio Iconos de apps Iconos de apps Barra de estado Barra de estado Altavoz Altavoz Conector Lightning Conector Lightning Micrófono Micrófono Salida de auriculares Salida de auriculares Bandeja de la tarjeta micro-SIM (en algunos modelos) Bandeja de la tarjeta micro-SIM (en algunos modelos) Reposo/ activación Reposo/ activación Cámara iSight Cámara iSight Subir/ bajar volumen Subir/ bajar volumen Interruptor lateral Interruptor lateral Las funciones del iPad y la pantalla de inicio pueden ser distintas, dependiendo de su modelo de iPad. Accesorios Los accesorios siguientes están incluidos en el iPad: Adaptador de corriente USB: Utilice el adaptador de corriente incluido para suministrar corriente al iPad y cargar la batería.Capítulo 1 Visión general 9 Nota: El adaptador de corriente incluido con el iPad puede variar en función del modelo y la región. Cable de Lightning a USB: Utilice este cable para conectar el iPad y el iPad mini al adaptador de corriente USB para recargarlo o al ordenador para sincronizarlo. Puede utilizarlo con la base iPad Dock opcional o conectarlo directamente al iPad. Cable de conector Dock a USB: Utilice este cable para conectar el iPad 2 y el iPad de tercera generación al adaptador de corriente USB para recargarlo o al ordenador para sincronizarlo. Puede utilizarlo con la base iPad Dock opcional o conectarlo directamente al iPad. Botones Unos pocos botones permiten bloquear el iPad y ajustar el volumen. Botón de reposo/activación Puede bloquear el iPad poniéndolo en modo de reposo cuando no lo esté utilizando. Cuando el iPad está bloqueado, no ocurrirá nada si toca la pantalla, pero podrá seguir escuchando música y utilizando el botón de volumen. Botón de reposo/ activación Botón de reposo/ activación Bloqueo del iPad: Pulse el botón de reposo/activación. Desbloqueo del iPad: Pulse el botón de inicio o el botón de reposo/activación y, a continuación, arrastre el regulador. Desactivación del iPad: Mantenga pulsado el botón de reposo/activación durante unos segundos hasta que aparezca el regulador rojo y, a continuación, arrastre el regulador que aparece en la pantalla. Activación del iPad: Mantenga pulsado el botón de reposo/activación hasta que aparezca el logotipo de Apple. El iPad está configurado para bloquearse automáticamente si no toca la pantalla durante uno o dos minutos. Puede cambiar el tiempo que tarda la pantalla en bloquearse o configurar un código para desbloquear el iPad. Ajuste del periodo de tiempo del bloqueo automático: Vaya a Ajustes > General > Bloqueo automático.Capítulo 1 Visión general 10 Establecer un código: Vaya a Ajustes > General > Bloqueo con código. Puede utilizar una Smart Cover para el iPad o una Smart Case para el iPad (de venta por separado) para bloquear o desbloquear automáticamente el iPad 2 o versiones posteriores. Uso de una Smart Cover para el iPad o de una Smart Case para el iPad: Vaya a Ajustes > General > (Des)bloqueo mediante tapa. Botón de inicio El botón de inicio le permite regresar a la pantalla de inicio en cualquier momento. Ofrece también otras funciones rápidas que resultan muy prácticas. Ir a la pantalla de inicio: Pulse el botón de inicio . En la pantalla de inicio, pulse una app para abrirla. Consulte Apertura de apps y cambio de una a otra en la página 20. Mostrar apps utilizadas recientemente: Cuando el iPad esté desbloqueado, haga doble clic en el botón de inicio . La barra multitarea aparece en la parte inferior de la pantalla y muestra las apps que se han utilizado más recientemente. Desplace la barra hacia la izquierda para ver más apps. Mostrar los controles de reproducción de audio: • Cuando el iPad esté bloqueado: Haga doble clic en el botón de inicio . Consulte Reproducción de música en la página 83. • Cuando esté utilizando otra app: Haga doble clic en el botón de inicio y, a continuación, deslice la barra multitarea de izquierda a derecha. Uso de Siri (iPad de tercera generación o posterior): Mantenga pulsado el botón de inicio . Consulte Capítulo 4, Siri, en la página 39. Botón de volumen e interruptor lateral Utilice el interruptor lateral para desactivar las alertas de audio y las notificaciones. También puede utilizarlo para bloquear la rotación de la pantalla e impedir que la pantalla del iPad pase de orientación vertical a horizontal, y viceversa. Ajustar el volumen: Pulse el botón para subir y bajar el volumen para modificar el volumen. • Silenciar el sonido: Mantenga pulsado el extremo inferior del botón de volumen. • Establecer un límite de volumen: Vaya a Ajustes > Música > Límite de volumen. Silenciar las notificaciones, alertas y efectos de sonido: Mueva el interruptor lateral hacia abajo. Este interruptor lateral no silencia la reproducción de audio, como música, podcasts, películas y programas de televisión. Consulte Interruptor lateral en la página 124. Bloquear la rotación de la pantalla: Vaya a Ajustes > General > “Usar interruptor lateral para…” y, a continuación, pulse “Bloquear rotación”.Capítulo 1 Visión general 11 Utilice el botón de volumen para ajustar el volumen de las canciones y de otros contenidos, así como de las alertas y otros efectos de sonido. Subir/bajar volumen Subir/bajar volumen Interruptor lateral Interruptor lateral ADVERTENCIA: Para obtener información importante sobre la prevención de la pérdida de audición, consulte Información importante sobre seguridad en la página 133. También puede utilizar el ajuste “No molestar” para silenciar las llamadas de FaceTime, las alertas y las notificaciones. Ajuste el iPad en “No molestar”: Vaya a Ajustes y active el modo “No molestar”. El modo “No molestar” desactiva el sonido de las alertas y notificaciones o desactiva la iluminación de la pantalla cuando la pantalla está bloqueada. Las alarmas seguirán sonando y, si desbloquea la pantalla, “No molestar” no tendrá efecto. Para programar horas de silencio, permitir llamadas de personas concretas o permitir que suenen llamadas repetidas de FaceTime, vaya a Ajustes > Notificaciones > No molestar. Consulte “No molestar” y notificaciones en la página 120. Bandeja de la tarjeta SIM La tarjeta SIM de los modelos iPad Wi-Fi + cellular se utiliza para datos de la red de telefonía móvil. Si su tarjeta SIM no venía preinstalada o si cambia de operador de datos móviles, es posible que tenga que instalar o sustituir la tarjeta SIM. iPad mini Wi-Fi + cellular Tarjeta nano-SIM Tarjeta nano-SIM Bandeja de la tarjeta SIM Bandeja de la tarjeta SIM Herramienta de expulsión de tarjetas SIM Herramienta de expulsión de tarjetas SIMCapítulo 1 Visión general 12 iPad Wi-Fi + cellular Tarjeta micro-SIM Tarjeta micro-SIM Bandeja de la tarjeta SIM Bandeja de la tarjeta SIM Herramienta de expulsión de tarjetas SIM Herramienta de expulsión de tarjetas SIM Abrir la bandeja SIM: Inserte el extremo de la herramienta de expulsión de tarjetas SIM en el hueco de la bandeja SIM. Presione firmemente y empuje la herramienta hacia dentro hasta que la bandeja se expulse. Extraiga la bandeja SIM para instalar o sustituir la tarjeta SIM. Si no dispone de herramienta de expulsión de tarjetas SIM, es posible que pueda utilizar el extremo de un clip pequeño. Para obtener más información, consulte Datos móviles en la página 119. Iconos de estado Los iconos de la barra de estado en la parte superior de la pantalla proporcionan información sobre el iPad: Icono de estado Significado Modo Avión Muestra que el modo Avión está activado, lo que significa que no puede acceder a Internet ni usar dispositivos Bluetooth®. Las funciones no inalámbricas están disponibles. Consulte Modo Avión en la página 117. LTE Indica que el iPad (Wi-Fi + cellular) está conectado a Internet a través de una red 4G LTE. 4G Indica que el iPad (Wi-Fi + cellular) está conectado a Internet a través de una red 4G. 3G Indica que el iPad (Wi-Fi + cellular) está conectado a Internet a través de una red 3G. EDGE Indica que el iPad (Wi-Fi + cellular) está conectado a Internet a través de una red EDGE. GPRS Indica que el iPad (Wi-Fi + cellular) está conectado a Internet a través de una red GPRS. Wi-Fi Muestra que el iPad tiene una conexión a Internet Wi-Fi. Cuantas más barras hay, más potente es la conexión. Consulte Conexión a una red Wi-Fi en la página 117. No molestar Muestra que “No molestar” está activado. Consulte “No molestar” y notificaciones en la página 120. Compartir Internet Muestra que el iPad comparte Internet con otro iPad, iPhone o iPod touch. Consulte Compartir Internet en la página 118. Sincronización Muestra que el iPad se está sincronizando con iTunes. Consulte Sincronización con iTunes en la página 18.Capítulo 1 Visión general 13 Icono de estado Significado Actividad Indica la actividad de red y de otros recursos. Algunas apps de terceros utilizan este icono para mostrar un proceso activo. VPN Muestra que está conectado a una red mediante VPN. Consulte VPN en la página 118. Bloqueo Muestra que el iPad está bloqueado. Consulte Botón de reposo/activación en la página 9. Alarma Muestra que hay una alarma activada. Consulte Capítulo 17, Reloj, en la página 79. Bloqueo de la orientación de la pantalla Muestra que la orientación de la pantalla está bloqueada. Consulte Orientación vertical u horizontal en la página 22. Localización Indica que una app está utilizando los servicios de localización. Consulte Privacidad en la página 127. Reproducir Muestra que se está reproduciendo una canción, audiolibro o podcast. Consulte Reproducción de música en la página 83. Bluetooth Icono blanco: Bluetooth está activado y hay un dispositivo enlazado, como un auricular manos libres o un teclado. Icono gris: Bluetooth está activado y enlazado con un dispositivo, pero el dispositivo está fuera del radio de alcance o apagado. Sin icono: Bluetooth no está enlazado con un dispositivo. Consulte Dispositivos Bluetooth en la página 35. Batería Bluetooth Muestra el nivel de batería de un dispositivo Bluetooth enlazado compatible. Batería Muestra el nivel de la batería o el estado de la carga. Consulte Batería en la página 38.2 14 En este capítulo encontrará información acerca de cómo configurar el iPad, configurar cuentas de correo, utilizar iCloud y muchas otras cosas. Requisitos necesarios · ADVERTENCIA: Para evitar lesiones, lea Información importante sobre seguridad en la página 133 antes de utilizar el iPad. Para utilizar el iPad, necesita lo siguiente: • una conexión a Internet (se recomienda banda ancha). • un ID de Apple para algunas funciones como iCloud, las tiendas App Store y iTunes Store, y para comprar por Internet; Puede crear un ID de Apple durante la configuración; Para utilizar el iPad con su ordenador, necesita lo siguiente: • un Mac con un puerto USB 2.0 o 3.0, o un PC con un puerto USB 2.0, y uno de estos sistemas operativos: • Mac OS X 10.6.8 o posterior • Windows 7, Windows Vista o Windows XP Home o Professional con el Service Pack 3 o posterior • iTunes 11 o posterior (para algunas características), disponible en www.itunes.com/es/download. Configuración del iPad Para configurar el iPad, enciéndalo y siga las instrucciones del Asistente de Configuración. Las indicaciones en pantalla del Asistente de Configuración le guiarán a lo largo de todo el proceso de configuración: • Conexión a una red Wi-Fi • Inicio de sesión con un ID de Apple o creación de un ID de Apple de forma gratuita • Configuración de iCloud • Activación de funciones recomendadas, como Localización y Buscar mi iPad. Durante el proceso de configuración, puede copiar sus apps, ajustes y contenidos desde otro iPad restaurándolos a partir de una copia de seguridad de iCloud o desde iTunes. Consulte Realización de copias de seguridad del iPad en la página 138. ID de Apple Un ID de Apple es el nombre de usuario de una cuenta gratuita que le permite acceder a servicios de Apple, tales como la tienda iTunes Store, la tienda App Store y iCloud. Necesitará un solo ID de Apple para todo lo que haga con Apple. Tal vez se le cobre por los servicios y productos que utilice, adquiera o alquile. IntroducciónCapítulo 2 Introducción 15 Si tiene un ID de Apple, utilícelo la primera vez que configure el iPad o cuando tenga que iniciar sesión para utilizar un servicio de Apple. Si todavía no tiene un ID de Apple, puede crear uno ahora o cuando tenga que iniciar sesión. Crear un ID de Apple: Vaya a Ajustes > “iTunes Store y App Store” y, a continuación, pulse Conectarse. (Si ya ha iniciado sesión en la cuenta y quiere crear otro ID de Apple, pulse primero su ID de Apple y, a continuación, pulse Desconectarse.) Para obtener más información, consulte support.apple.com/kb/he37?viewlocale=es_ES. Configuración del correo y otras cuentas El iPad puede utilizarse con iCloud, Microsoft Exchange y muchos de los proveedores habituales de servicios de correo, contactos y calendarios a través de Internet. Si aún no dispone de una cuenta de correo electrónico, puede configurar una cuenta iCloud gratuita cuando configure el iPad o hacerlo más adelante desde Ajustes > iCloud. Consulte Cómo usar iCloud en la página 16. Configurar una cuenta de iCloud: Vaya a Ajustes > iCloud. Configurar otra cuenta: Vaya a Ajustes > Correo, contactos, calendarios. Si su empresa u organización lo permite, puede añadir contactos mediante una cuenta LDAP o CardDAV. Consulte Cómo añadir contactos en la página 74. Para obtener información acerca de cómo configurar una cuenta de Microsoft Exchange en un entorno de empresa, consulte Configuración de cuentas de Microsoft Exchange en la página 128. Cómo gestionar el contenido del iPad Puede transferir información y archivos entre el iPad y sus otros dispositivos iOS y ordenadores mediante iCloud o iTunes. • iCloud almacena contenidos, como música, fotos, calendarios, contactos, documentos y otros tipos de archivos, y los transfiere de forma inalámbrica a sus otros dispositivos iOS y ordenadores mediante la tecnología push, de modo que todo se mantenga actualizado. Consulte Cómo usar iCloud más adelante. • iTunes sincroniza música, vídeo, fotos y otros tipos de archivos entre su ordenador y el iPad. Los cambios que realice en un dispositivo se copiarán en el otro cuando realice una sincronización. También puede usar iTunes para copiar un archivo en el iPad a fin de utilizarlo con una app, o para copiar en el ordenador un documento que haya creado en el iPad. Consulte Sincronización con iTunes en la página 18. Puede utilizar iCloud, iTunes, o ambos, según sus necesidades. Por ejemplo, puede utilizar Fotos en streaming de iCloud para transferir automáticamente fotos que haya realizado en el iPad a sus otros dispositivos, y puede utilizar iTunes para sincronizar álbumes de fotos del ordenador en el iPad. Nota: No sincronice ítems en el panel Información de iTunes (como contactos, calendarios y notas) y utilice también iCloud para mantener esa información actualizada en sus dispositivos. De lo contrario, puede tener información duplicada en el iPad.Capítulo 2 Introducción 16 Cómo usar iCloud iCloud almacena sus contenidos, como música, fotos, contactos, calendarios y documentos compatibles. Los contenidos almacenados en iCloud se transfieren de forma inalámbrica a sus dispositivos iOS y ordenadores configurados con la misma cuenta de iCloud. iCloud está disponible en dispositivos iOS con iOS 5 o posterior, en ordenadores Mac con OS X Lion 10.7.2 o posterior y en equipos PC con el Panel de control de iCloud para Windows (se requiere Windows Vista Service Pack 2 o Windows 7). Entre las funciones de iCloud se incluyen las siguientes: • iTunes en la nube: descargue compras anteriores de música y programas de televisión de iTunes en el iPad de forma gratuita y en cualquier momento. • Apps y libros: descargue compras anteriores realizadas en las tiendas App Store y iBookstore de forma gratuita y en cualquier momento. • Fotos en streaming: las fotos que realice en un dispositivo aparecerán de forma automática en todos sus dispositivos. Consulte Fotos en streaming en la página 62. • Documentos en la nube: para apps con iCloud activado, mantenga actualizados los documentos y datos de las apps en todos sus dispositivos. • Correo, contactos, calendarios: mantenga actualizados sus contactos de correo, calendarios, notas y recordatorios en todos sus dispositivos. • Copia de seguridad: realice copias de seguridad del iPad en iCloud automáticamente cuando se conecte a una fuente de alimentación y a una red Wi-Fi. Consulte Cómo realizar copias de seguridad con iCloud en la página 138. • Buscar mi iPad: localice su iPad en un mapa, muestre un mensaje, reproduzca un sonido, bloquee la pantalla o borre los datos de forma remota. Consulte Buscar mi iPad en la página 37. • Buscar a mis amigos: ahora puede estar al corriente de lo que hacen sus familiares y amigos (cuando estén conectados a una red Wi-Fi o de datos de telefonía móvil) con la app Buscar a mis amigos. Descargue esta app gratuita en la tienda App Store. • iTunes Match: con una suscripción a iTunes Match, toda su música, incluida la música importada desde discos CD o adquirida en lugares distintos de iTunes, aparecerá en todos sus dispositivos y podrá descargarse y reproducirse bajo demanda. Consulte iTunes Match en la página 87. • Pestañas de iCloud: vea las páginas web abiertas en sus otros dispositivos iOS y ordenadores con OS X Mountain Lion o posterior instalado. Consulte Capítulo 5, Safari, en la página 45. Con iCloud, obtendrá una cuenta de correo electrónico gratuita y 5 GB de almacenamiento para su correo, sus documentos y sus copias de seguridad. La música, las apps, los programas de televisión y los libros que compre, así como el espacio que ocupe en Fotos en streaming, no se descontarán del total de su espacio libre. Nota: Es posible que iCloud no esté disponible en todas las áreas, y sus funciones pueden variar según el área. Para obtener más información, visite www.apple.com/es/icloud. Iniciar sesión o crear una cuenta iCloud: Vaya a Ajustes > iCloud.Capítulo 2 Introducción 17 Gestionar iCloud: Vaya a Ajustes > iCloud. • Activar o desactivar servicios: Vaya a Ajustes > iCloud y, después, active servicios como “Fotos en streaming” y “Documentos y datos”. • Activar copias de seguridad de iCloud: Vaya a Ajustes > iCloud > “Almacenamiento y copias”. • Comprar más espacio de almacenamiento de iCloud: Vaya a Ajustes > iCloud > “Almacenamiento y copias” > “Gestionar almacenamiento” > “Cambiar plan de almacenamiento” y, después, seleccione una opción más completa. Para obtener información sobre la forma de comprar espacio de almacenamiento para iCloud, consulte la help.apple.com/icloud. Activar las descargas automáticas de música, apps o libros: Vaya a Ajustes > Store. Ver y descargar compras anteriores: • Compras realizadas en la tienda iTunes Store: Vaya a iTunes y, a continuación, pulse Comprado . • Compras realizadas en la tienda App Store: Vaya a la tienda App Store y, a continuación, pulse Comprado . • Compras realizadas en la tienda iBookstore: Vaya a iBooks, pulse Store y, a continuación, pulse Comprado . Buscar su iPad: Vaya a www.icloud.com, inicie sesión con su ID de Apple y, a continuación, seleccione “Buscar mi iPad”. Importante: En el iPad, debe activar el ajuste “Buscar mi iPad en Ajustes > iCloud para poder localizar el iPad. Para obtener más información sobre iCloud, visite www.apple.com/es/icloud. Para obtener información de soporte, visite www.apple.com/mx/support/icloud, o www.apple.com/la/support/icloud. Conexión del iPad al ordenador Utilice el cable USB incluido para conectar el iPad al ordenador. Conectar el iPad al ordenador le permite sincronizar información, música y otros contenidos con iTunes. También le permite realizar una sincronización inalámbrica con iTunes. Consulte Sincronización con iTunes en la página 18. A menos que el iPad se esté sincronizando con el ordenador, podrá desconectarlo en cualquier momento. Si lo desconecta durante una sincronización, es posible que algunos datos no se sincronicen hasta la próxima ocasión en que conecte el iPad al ordenador. Capítulo 2 Introducción 18 Sincronización con iTunes La sincronización con iTunes copia información de su ordenador al iPad, y viceversa. Puede realizar una sincronización conectando el iPad al ordenador mediante el cable USB incluido o puede configurar iTunes para que realice una sincronización inalámbrica vía Wi-Fi. Puede configurar iTunes para sincronizar música, fotos, vídeos, podcasts, apps y otros tipos de archivos. Para obtener información sobre la forma de sincronizar el iPad, abra iTunes en su ordenador y seleccione “Ayuda iTunes” en el menú Ayuda. Configurar la sincronización inalámbrica con iTunes: Conecte el iPad al ordenador mediante el cable USB incluido. En iTunes, en el ordenador, seleccione su iPad (dentro de Dispositivos), haga clic en Resumen y active “Sincronizar vía Wi-Fi”. Cuando la sincronización Wi-Fi está activada, el iPad se sincroniza automáticamente todos los días. El iPad debe estar conectado a una fuente de alimentación, tanto el iPad como su ordenador deben estar conectados a la misma red inalámbrica y iTunes debe estar abierto en el ordenador. Para obtener más información, consulte Sincronización con iTunes vía Wi-Fi en la página 122. Consejos para realizar la sincronización con iTunes • Si utiliza iCloud para almacenar sus contactos, calendarios, favoritos y notas, no los sincronice también con el iPad utilizando iTunes. • Las compras realizadas en las tiendas iTunes Store o App Store en el iPad se sincronizan con la biblioteca de iTunes. También puede adquirir o descargar contenidos y apps de iTunes Store en su ordenador, y después sincronizarlos con el iPad. • En el panel Resumen del dispositivo, puede ajustar iTunes para que sincronice automáticamente el iPad cuando se conecte a su ordenador. Para invalidar temporalmente este ajuste, mantenga pulsadas las teclas Comando y Opción (Mac) o Mayúsculas y Control (PC) hasta vea que el iPad aparece en la barra lateral. • En el panel Resumen del dispositivo, seleccione “Cifrar copia de seguridad del iPad” si desea encriptar la información almacenada en su ordenador cuando iTunes realice una copia de seguridad. Las copias de seguridad encriptadas se indican con el icono de un candado , y se requiere una contraseña para restablecer la copia de seguridad. Si no selecciona esta opción, otras contraseñas (como las de las cuentas de correo) no se incluirán en la copia de seguridad y tendrán que volver a introducirse si utiliza la copia de seguridad para restaurar el iPad. • En el panel Información del dispositivo, cuando sincronice cuentas de correo, solo se transferirán los ajustes de su ordenador al iPad. Los cambios que realice en una cuenta de correo del iPad no afectan a la cuenta del ordenador. • En el panel Información del dispositivo, haga clic en Avanzado para seleccionar opciones que le permitan reemplazar la información del iPad por la información de su ordenador en la siguiente sincronización. • Si escucha parte de un podcast o audiolibro, el punto en que se haya detenido se incluirá si sincroniza este contenido con iTunes. Si empezó a escucharlo en el iPad, podrá seguir donde lo dejó en iTunes en su ordenador o viceversa. • En el panel Foto del dispositivo, puede sincronizar fotos y vídeos de una carpeta de su ordenador.Capítulo 2 Introducción 19 Visualización del manual del usuario en el iPad Puede consultar el Manual del usuario del iPad en el iPad en Safari y en la app gratuita iBooks. Visualizar el manual del usuario en Safari: En Safari, pulse y, a continuación, pulse el favorito Manual del usuario del iPad. Puede consultar también la página help.apple.com/ipad. Añadir un icono para el manual del usuario en la pantalla de inicio. Pulse y, a continuación, pulse “Añadir a pantalla inicio”. Visualizar el manual del usuario en iBooks: Si no tiene instalado iBooks, abra la tienda App Store y, a continuación, busque e instale “iBooks”. Abra iBooks y pulse Tienda. Busque “Manual del usuario del iPad” y, a continuación, seleccione y descargue el manual del usuario. Para obtener más información sobre iBooks, consulte Capítulo 23, iBooks, en la página 94.3 20 Uso de las apps La interacción con el iPad se realiza empleando los dedos para pulsar, pulsar dos veces, desplazarse arrastrando los dedos o juntándolos y separándolos sobre los objetos de la pantalla táctil. Apertura de apps y cambio de una a otra Para ir a la pantalla de inicio, pulse el botón de inicio . Abrir una app: Púlsela. Para volver a la pantalla de inicio, vuelva a pulsar el botón de inicio . Ver las apps usadas recientemente: Haga doble clic en el botón de inicio para ver la barra multitarea. Pulse una app para volver a utilizarla. Desplácese hacia la izquierda para ver más apps. Si tiene muchas apps, tal vez desee utilizar Spotlight para localizarlas y abrirlas. Consulte Cómo buscar en la página 30. Nociones básicasCapítulo 3 Nociones básicas 21 Desplazamiento Arrastre hacia arriba o hacia abajo para desplazarse. En algunas pantallas, como las páginas web, también puede desplazarse lateralmente. Si arrastra el dedo para desplazarse por la pantalla, no seleccionará ni activará nada. Pulse ligeramente para desplazarse rápidamente. Puede esperar a que el desplazamiento se detenga o bien tocar cualquier otro punto de la pantalla para detenerlo inmediatamente. Para ir rápidamente a la parte superior de una página, pulse la barra de estado situada en la parte superior de la pantalla. Listas Según la lista, seleccionar un ítem puede tener efectos diferentes; por ejemplo, puede abrir otra lista, reproducir una canción, abrir un mensaje de correo electrónico o mostrar la información de uno de sus contactos. Seleccionar un ítem de una lista: Púlsela. Algunas listas disponen de un índice a un lado que le permite navegar por ellas rápidamente. Buscar ítems en una lista indexada: Pulse una letra para ir directamente a los ítems que empiezan por dicha letra. O arrastre el dedo a lo largo del índice para desplazarse rápidamente por la lista. Volver a una lista o pantalla anterior: Pulse el botón Atrás de la esquina superior izquierda.Capítulo 3 Nociones básicas 22 Zoom en las imágenes Dependiendo de la app, puede ampliar o reducir la imagen de la pantalla con el zoom. Cuando vea fotografías, páginas web, mensajes de correo o mapas, por ejemplo, junte los dedos sobre la pantalla para alejar la imagen o sepárelos para acercarla. Con fotografías y páginas web, también puede pulsar dos veces rápidamente sobre la pantalla para ampliar la imagen y volver a pulsar dos veces para reducirla. Con mapas, pulse dos veces para acercar la imagen y una vez con dos dedos para alejarla. El zoom también es una prestación de accesibilidad que le permite ampliar la pantalla de cualquier app que esté usando para ayudarle a ver lo que hay en la pantalla. Consulte Zoom en la página 113. Gestos para multitarea Puede utilizar gestos para multitarea en el iPad para regresar a la pantalla de inicio, mostrar la barra multitarea o pasar a otra app. Volver a la pantalla de inicio: Realice un movimiento de pellizco con cuatro o cinco dedos hacia dentro. Mostrar la barra multitarea: Desplácese hacia arriba con cuatro o cinco dedos. Cambiar de app: Desplácese hacia la izquierda o hacia la derecha con cuatro o cinco dedos. Activar o desactivar los gestos para multitarea: Vaya a Ajustes > General > Gestos para multitarea. Orientación vertical u horizontal Puede ver muchas apps del iPad en orientación vertical u horizontal. Gire iPad y la pantalla girará también ajustándose automáticamente a la nueva orientación.Capítulo 3 Nociones básicas 23 Bloquear la orientación de la pantalla: Haga doble clic en el botón de inicio , desplace la barra multitarea de izquierda a derecha y pulse . El icono de bloqueo de la orientación aparece en la barra de estado cuando la orientación de la pantalla está bloqueada. También puede configurar el interruptor lateral para que bloquee la orientación de la pantalla en vez de silenciar los efectos de sonido y las notificaciones. Vaya a Ajustes > General y, en “Usar interruptor lateral para”, pulse “Bloquear rotación”. Consulte Interruptor lateral en la página 124. Ajuste del brillo de la pantalla Puede ajustar manualmente el brillo de la pantalla o activar la opción “Brillo automático” para que el iPad utilice el sensor de luz ambiental integrado para ajustar automáticamente el brillo. Ajustar el brillo de la pantalla: Haga doble clic en el botón de inicio , desplace la barra multitarea de izquierda a derecha y, después, arrastre el regulador de brillo. Brillo Brillo Activar o desactivar “Brillo automático”: Vaya a Ajustes > Brillo y fondo de pantalla. Consulte Brillo y fondo de pantalla en la página 126. Personalización del iPad Puede personalizar la disposición de sus apps en la pantalla de inicio, organizarlas en carpetas y cambiar el fondo de pantalla. Reorganización de las apps Personalice la pantalla de inicio reorganizando las apps, trasladándolas al Dock a lo largo de la parte inferior de la pantalla y creando otras pantallas de inicio. Reorganizar las apps: Mantenga pulsada cualquier app de la pantalla de inicio hasta que su icono empiece a moverse. Después, desplace las apps arrastrándolas. Pulse el botón de inicio para guardar su disposición.Capítulo 3 Nociones básicas 24 Crear una nueva pantalla de inicio: Mientras organiza las apps, arrastre una de ellas hacia el extremo derecho de la pantalla hasta que aparezca una nueva pantalla. Puede crear hasta 11 pantallas de inicio. Los puntos que aparecen encima del Dock indican el número de pantallas que hay y cuál se está viendo. • Alternar entre diferentes pantallas de inicio: Desplácese hacia la izquierda o hacia la derecha. • Ir a la primera pantalla de inicio: Pulse el botón de inicio . Trasladar un app a otra pantalla: Mientras su icono se esté moviendo, arrastre la app hasta el borde de la pantalla. Personalizar la pantalla de inicio utilizando iTunes: Conecte el iPad al ordenador. En iTunes, en su ordenador, seleccione iPad y, a continuación, haga clic en el botón “Aplic.” para ver la imagen de la pantalla de inicio del iPad. Restablecer la disposición original de la pantalla de inicio: Vaya a Ajustes > General > Restablecer y, a continuación, pulse “Restablecer pantalla de inicio”. Al restablecer la pantalla de inicio, se eliminan todas las carpetas que haya creado y se le aplica el fondo de pantalla por omisión. Organización mediante carpetas Puede utilizar carpetas para organizar las apps en las pantallas de inicio. Reorganice las carpetas, del mismo modo que con las apps, arrastrándolas por las pantallas de inicio o hasta el Dock. Crear una carpeta: Mantenga pulsada una app hasta que los iconos de la pantalla de inicio comiencen a moverse y, a continuación, arrastre una app sobre otra. El iPad creará una nueva carpeta que incluirá estas dos apps y le dará un nombre en función del tipo de apps que contiene. Para introducir otro nombre, pulse el campo del nombre. Abrir una carpeta: Pulse la carpeta. Para cerrar una carpeta, pulse fuera de la carpeta o bien pulse el botón de inicio . Organizar las apps mediante carpetas: Mientras organiza las apps (sus iconos se mueven): • Añadir una app a una carpeta: Arrastre la app sobre la carpeta. • Eliminar una app de una carpeta: Abra la carpeta si es necesario y arrastre la app fuera de ella. • Borrar una carpeta: Mueva todas las apps fuera de la carpeta. La carpeta se elimina automáticamente. • Renombrar una carpeta: Pulse para abrir la carpeta y, a continuación, pulse el nombre e introduzca uno nuevo. Cuando termine, pulse el botón de inicio . Modificación del fondo de pantalla Puede personalizar la pantalla bloqueada y la pantalla de inicio seleccionando una imagen o fotografía para utilizarla como fondo de pantalla. Seleccione una de las imágenes incluidas o una fotografía de su Carrete o de otro álbum del iPad. Cambiar el fondo de pantalla: Vaya a Ajustes > Brillo y fondo de pantalla.Capítulo 3 Nociones básicas 25 Escritura El teclado en pantalla le permite escribir cuando tenga que introducir texto. Introducción de texto Utilice el teclado en pantalla para introducir texto (por ejemplo, información de contacto, mensajes de correo y direcciones web). Dependiendo de la app y del idioma que esté utilizando, el teclado podrá corregir faltas de ortografía, predecir lo que va a escribir e incluso aprender a medida que lo utilice. También puede utilizar un teclado inalámbrico Apple para escribir. Consulte Teclado inalámbrico de Apple en la página 28. Para usar el dictado en vez de escribir, consulte Dictado en la página 29. Introducir texto: Pulse un campo de texto para que aparezca el teclado y, a continuación, pulse las teclas del teclado. Mientras escribe, cada letra aparecerá encima del dedo. Si pulsa la tecla equivocada, puede desplazar el dedo hasta la tecla correcta. La letra no aparecerá hasta que retire el dedo de la tecla. • Escribir en mayúsculas: Pulse la tecla Mayúsculas antes de pulsar una letra. También puede mantener pulsada la tecla Mayúsculas y, a continuación, deslizar el dedo hasta una letra. • Escribir rápidamente un punto y un espacio: Pulse dos veces en la barra espaciadora. • Activar el bloqueo de mayúsculas: Pulse dos veces la tecla Mayúsculas . Para desactivar el bloqueo de mayúsculas, pulse la tecla Mayúsculas. • Introducir números, signos de puntuación o símbolos: Pulse la tecla Número . Para ver otros símbolos y signos de puntuación, pulse la tecla Símbolo . • Introducir letras acentuadas u otros caracteres alternativos: Mantenga pulsada una tecla y seleccione una de las opciones. Ocultar el teclado en pantalla: Pulse la tecla de teclado . Ajustar las opciones de escritura: Vaya a Ajustes > General > Teclado.Capítulo 3 Nociones básicas 26 Edición de texto Si tiene que editar texto, una lupa en pantalla le permitirá colocar el punto de inserción donde necesite. Podrá seleccionar texto y cortarlo, copiarlo o pegarlo. En algunas apps, también puede cortar, copiar y pegar fotos y vídeos. Situar el punto de inserción: Mantenga el dedo pulsado para mostrar la lupa y, a continuación, arrastre para colocar el punto de inserción. Seleccionar texto: Pulse el punto de inserción para mostrar los botones de selección. Pulse Seleccionar para seleccionar la palabra adyacente o pulse “Seleccionar todo” para seleccionar todo el texto. También puede pulsar dos veces una palabra para seleccionarla. Arrastre los puntos de captura para seleccionar más o menos texto. En los documentos de solo lectura, como las páginas web, mantenga el dedo sobre una palabra para seleccionarla. Puntos de captura Puntos de captura Cortar o copiar texto: Seleccione texto y, a continuación, pulse Cortar o Copiar. Pegar texto: Pulse el punto de inserción y, a continuación, pulse Pegar para insertar el último texto que haya cortado o copiado. Para sustituir texto, selecciónelo antes de pulsar Pegar. Deshacer la última modificación: Agite el iPad y, a continuación, pulse Deshacer. Poner el texto en negrita o cursiva, o subrayarlo: Seleccione texto, pulse y, a continuación, pulse B/I/U (no siempre disponible). Obtener la definición de una palabra: Seleccione la palabra y pulse Definir (no siempre disponible). Obtener palabras alternativas: Seleccione una palabra y, a continuación, pulse Sugerir (no siempre disponible). Justificar el texto: Seleccione el texto y, después, pulse la flecha izquierda o derecha (no siempre disponible).Capítulo 3 Nociones básicas 27 Autocorrección y ortografía Con muchos idiomas, el iPad utiliza el diccionario activo para corregir faltas de ortografía o hacer sugerencias mientras se escribe. Cuando el iPad sugiere una palabra, no es necesario dejar de escribir para aceptar la sugerencia. Para ver una lista de los idiomas incluidos, consulte www.apple.com/es/ipad/specs, www.apple.com/mx/ipad/specs o www.apple.com/la/ipad/specs. Aceptar la sugerencia: Escriba un espacio, un signo de puntuación o un retorno de carro. Rechazar una sugerencia: Pulse la “x” situada al lado de la sugerencia. Cada vez que rechace una sugerencia para la misma palabra, es más probable que el iPad acepte la palabra. El iPad también puede subrayar las palabras que ya se han introducido y que pueden estar mal escritas. Sustituir una palabra mal escrita: Pulse la palabra subrayada y, a continuación, pulse la forma correcta. Si la palabra que desea no aparece, escríbala de nuevo. Activar o desactivar la autocorrección y el corrector ortográfico: Vaya a Ajustes > General > Teclado. Funciones rápidas y su diccionario personal Las funciones rápidas le permiten escribir unos pocos caracteres en lugar de tener que escribir una palabra o frase más larga. Cada vez que escribe la función rápida, aparece el texto expandido. Por ejemplo, la función rápida “qhh” se expande a “¿Qué hacemos hoy?”. Crear una función rápida: Vaya a Ajustes > General > Teclado y, a continuación, pulse “Crear función rápida”. Evitar que el iPad corrija una palabra o frase: Cree una función rápida, pero deje en blanco el campo “Función rápida”. Editar una función rápida: Vaya a Ajustes > General > Teclado y, a continuación, pulse la función rápida. Usar iCloud para mantener su diccionario personal actualizado en sus otros dispositivos iOS: Vaya a Ajustes > iCloud y, a continuación, active “Documentos y datos”.Capítulo 3 Nociones básicas 28 Disposiciones de teclado En el iPad, puede escribir con un teclado dividido situado en la parte inferior de la pantalla o libre en medio de la pantalla. Ajustar el teclado: Mantenga pulsado y, a continuación: • Utilizar un teclado dividido: Deslice el dedo para dividir el teclado y, a continuación, apártelo. • Colocar el teclado en medio de la pantalla: Deslice el dedo para desbloquear la posición del teclado y, a continuación, apártelo. • Regresar a un teclado completo: Deslice el dedo para bloquear la posición del teclado y unir las dos partes y, a continuación, apártelo. • Devolver un teclado completo a la parte inferior de la pantalla: Deslice el dedo para bloquear la posición del teclado y, a continuación, apártelo. Activar y desactivar “Teclado dividido”: Vaya a Ajustes > General > Teclado > Teclado dividido. Puede utilizar Ajustes para establecer las disposiciones del teclado en pantalla o bien del teclado inalámbrico de Apple que utiliza con el iPad. Las disposiciones que están disponibles dependen del idioma del teclado. Consulte Teclado inalámbrico de Apple más adelante y Apéndice B, Teclados internacionales, en la página 130. Seleccionar disposiciones de teclado: Vaya a Ajustes > General > Internacional > Teclados, elija un idioma y, a continuación, seleccione las disposiciones. Teclado inalámbrico de Apple Puede utilizar un teclado inalámbrico de Apple (disponible por separado) para escribir en el iPad. El teclado inalámbrico de Apple se conecta por Bluetooth, por lo que primero deberá enlazarlo con el iPad. Consulte Enlace con dispositivos Bluetooth en la página 35. Cuando el teclado esté enlazado con el iPad, se conectará siempre que el teclado se encuentre dentro de su radio de acción (hasta 10 metros). Cuando hay un teclado inalámbrico conectado, el teclado en pantalla no aparece al pulsar en un campo de texto. Para ahorrar batería, apague el teclado cuando no lo vaya a utilizar. Cambiar el idioma al usar un teclado de hardware: Pulse Comando + barra espaciadora para ver una lista de los idiomas disponibles. Pulse la barra espaciadora para seleccionar un idioma. Apagar un teclado inalámbrico: Mantenga pulsado el botón de encendido del teclado hasta que la luz verde se apague. El iPad desconectará el teclado cuando este esté apagado o fuera de su alcance. Desenlazar un teclado inalámbrico: Vaya a Ajustes > Bluetooth, pulse junto al nombre del teclado y pulse “Omitir dispositivo”.Capítulo 3 Nociones básicas 29 Dictado En un iPad compatible con esta función, puede dictar texto en vez de escribirlo. Para dictar texto, debe estar activada la función Siri y el iPad debe estar conectado a Internet. Puede incluir puntuación y dar órdenes para formatear el texto. Nota: Dictado puede no estar disponible en todos los idiomas o en todas las regiones, y sus funciones pueden variar. Pueden aplicarse tarifas de datos de telefonía móvil. Activar el dictado: Vaya a Ajustes > General > Siri y, a continuación, active Siri. Dictar texto: Desde el teclado en pantalla, pulse y, a continuación, hable. Cuando acabe, pulse . Pulse para empezar a dictar. Pulse para empezar a dictar. Para añadir texto, pulse de nuevo y siga dictando. Para insertar texto, pulse primero para colocar el punto de inserción. También puede sustituir texto seleccionado dictando. Añadir puntuación o dar formato al texto: Diga la puntuación o comando de formato. Por ejemplo, “Querida María coma el cheque está en el correo punto” resulta en “Querida María, el cheque está en el correo.” Entre los comandos de puntuación y formato se incluyen: • abrir comillas ... cerrar comillas • nuevo párrafo • mayúscula inicial (para comenzar con mayúscula la siguiente palabra) • activar mayúscula inicial ... desactivar mayúscula inicial (para comenzar con mayúscula todas las palabras) • todo en mayúsculas (para que la siguiente palabra entera esté en mayúsculas) • activar todo en mayúsculas ... desactivar todo en mayúsculas (para que las palabras encerradas estén por completo en mayúsculas) • activar todo en minúsculas ... desactivar todo en minúsculas (para que las palabras encerradas estén por completo en minúsculas) • activar sin espacio ... desactivar sin espacio (para que una serie de palabras aparezcan juntas) • cara feliz (para insertar el emoticono :-) • cara triste (para insertar el emoticono :-( • cara guiñando (para insertar el emoticono ;-)Capítulo 3 Nociones básicas 30 Cómo buscar Puede realizar búsquedas en muchas de las apps del iPad, así como en la Wikipedia y en Internet. Busque en una app en concreto o en todas a la vez utilizando Spotlight. Spotlight busca también en los nombres de las apps del iPad (en el caso de que disponga de muchas apps, puede que le interese utilizar Spotlight para localizarlas y abrirlas). Buscar en una app en concreto: Introduzca texto en el campo Buscar. Buscar en el iPad mediante Spotlight: Desplácese a la derecha desde la primera pantalla de inicio o pulse el botón de inicio desde cualquier pantalla de inicio. Introduzca texto en el campo Buscar. Los resultados de la búsqueda van apareciendo a medida que escribe. Pulse Buscar para ocultar el teclado y ver más resultados. Pulse un ítem de la lista para abrirlo. Los iconos le permitirán saber de qué apps proceden los resultados. El iPad puede mostrar el mejor resultado basándose en búsquedas anteriores. Spotlight busca en lo siguiente: • Contactos: todo el contenido • Apps: títulos • Música: nombres de canciones, artistas y álbumes, y títulos de podcasts y vídeos • Podcasts: títulos • Vídeos: títulos • Audiolibros: títulos • Notas: el texto de las notas • Calendario (eventos): títulos de eventos, invitados, ubicaciones y notas • Mail: campos De, Para y Asunto de todas las cuentas (no se realizan búsquedas en el texto de los mensajes) • Recordatorios: títulos • Mensajes: nombres y texto de los mensajes Buscar en Internet o en la Wikipedia con Spotlight: Desplácese al final de los resultados de búsqueda y pulse “Buscar en Internet” o “Buscar en Wikipedia”.Capítulo 3 Nociones básicas 31 Abrir una app desde la pantalla de búsqueda: Introduzca la totalidad o parte del nombre de la app y, a continuación, pulse en ella. Seleccionar los ítems en los que se va a buscar y el orden en el que se buscarán: Vaya a Ajustes > General > “Búsqueda en Spotlight”. Notificaciones Para garantizar que no se pierdan eventos importantes, muchas apps del iPad pueden proporcionar alertas. Un alerta puede aparecer brevemente en la parte superior de la pantalla como una tira que desaparece si no responde, o como una notificación en el centro de la pantalla que permanecerá hasta que la solucione. Algunas apps también pueden mostrar globos en su icono de la pantalla de inicio para informarle de que le esperan nuevos ítems; por ejemplo, pueden indicar cuántos nuevos mensajes de correo electrónico tiene. Si hay algún problema, como un mensaje que no ha podido enviarse, aparecerá un signo de admiración en el globo. Un globo con un número sobre una carpeta muestra el número total de alertas de todas las apps que hay en la carpeta. Las alertas también pueden aparecer en la pantalla de bloqueo. Responder a una alerta cuando el iPad está bloqueado: Desplácela de izquierda a derecha. El centro de notificaciones muestra todas sus alertas en un único lugar. Por tanto, si no pudo responder a la alerta cuando la recibió por primera vez, puede hacerlo desde el centro de notificaciones cuando esté preparado. Las alertas pueden incluir: • llamadas perdidas de FaceTime; • nuevos mensajes de correo electrónico; • nuevos mensajes de texto; • recordatorios; • eventos de calendario; • solicitudes de amistad (Game Center).Capítulo 3 Nociones básicas 32 También puede obtener el tiempo local y mostrar el valor de sus acciones bursátiles. Si ha iniciado sesión en sus cuentas de Twitter y Facebook, también puede tuitear y publicar en esas cuentas desde el centro de notificaciones. Ver el centro de notificaciones: Desplace el dedo hacia abajo desde la parte superior de la pantalla. • Responder a una alerta: Púlsela. • Eliminar una alerta: Pulse y, a continuación, pulse Borrar. Gestionar alertas para sus apps: Vaya a Ajustes > Notificaciones. Consulte “No molestar” y notificaciones en la página 120. Seleccionar sonidos de alerta, ajustar el volumen y activar o desactivar la vibración: Vaya a Ajustes > Sonidos. Compartir iPad le ofrece una gran variedad de formas de compartir contenidos con otras personas. Compartir dentro de apps En muchas apps, al pulsar se muestran las opciones para compartir, además de otras acciones, como imprimir o copiar. Las opciones varían dependiendo de la app utilizada.Capítulo 3 Nociones básicas 33 Facebook Inicie sesión en su cuenta de Facebook (o cree una cuenta nueva) en Ajustes para poder añadir comentarios directamente desde muchas de las apps del iPad. Iniciar sesión en una cuenta Facebook o crear una nueva: Vaya a Ajustes > Facebook. Publicar desde el centro de notificaciones: Pulse “Pulsar para publicar”. Para activar esta función, vaya a Ajustes > Notificaciones > Widget compartir. Publicar con Siri: Diga “Publicar en Facebook...” Publicar un ítem desde una app: En la mayoría de las apps, pulse . En Mapas, pulse , pulse “Compartir ubicación” y, a continuación, pulse Facebook. Ajustar las opciones de Facebook: Vaya a Ajustes > Facebook para: • Actualizar los contactos del iPad con los nombres y fotografías de Facebook • permitir a App Store, Calendario, Contactos y iTunes utilizar su cuenta. Instalar la app Facebook: Vaya a Ajustes > Facebook y, a continuación, pulse Instalar. Twitter Inicie sesión en su cuenta de Twitter (o cree una cuenta nueva) en Ajustes para poder añadir mensajes con archivos adjuntos desde muchas de las apps del iPad. Iniciar sesión en una cuenta Twitter o crear una cuenta nueva: Vaya a Ajustes > Twitter. Tuitear desde el centro de notificaciones: Pulse “Pulsar para tuitear”. Para activar esta función, vaya a Ajustes > Notificaciones > Widget compartir. Tuitear con Siri: Diga “Tuit...” Tuitee un ítem desde una app: Visualice el ítem, pulse y, a continuación, pulse Twitter. Si no se muestra , pulse la pantalla. Para incluir su ubicación, pulse “Añadir ubicación”. Enviar a Twitter una ubicación de Mapas: Pulse el marcador de ubicación, pulse , pulse “Compartir ubicación” y, a continuación, pulse Twitter. Al escribir un mensaje de Twitter, el número que aparece en la esquina inferior derecha en la pantalla de Twitter indica el número de caracteres que aún puede introducir. Los archivos adjuntos utilizan parte de los 140 caracteres permitidos en Twitter. Añadir nombres de usuario de Twitter y fotos a sus contactos: Vaya a Ajustes > Twitter y, a continuación, pulse “Actualizar contactos”. Ajustar las opciones de Twitter: Vaya a Ajustes > Twitter. Instalar la app Twitter: Vaya a Ajustes > Twitter y, a continuación, pulse Instalar. Conexión del iPad a un televisor u otro dispositivo Puede utilizar AirPlay con el Apple TV para transmitir contenidos en tiempo real a un televisor HD o conectar el iPad a su televisor mediante cables. AirPlay Con AirPlay, puede transmitir música, fotos y vídeos de forma inalámbrica a un Apple TV y otros dispositivos compatibles con AirPlay. Los controles de AirPlay aparecerán cuando esté disponible un dispositivo con AirPlay en la misma red Wi-Fi a la que esté conectado el iPad. También podrá duplicar el contenido de la pantalla del iPad en un televisor. Transmitir contenido a un dispositivo con AirPlay activado: Pulse y seleccione el dispositivo.Capítulo 3 Nociones básicas 34 Acceder a los controles de AirPlay y de reproducción de audio cuando se está utilizando cualquier app: Si la pantalla está encendida, haga doble clic en el botón de inicio y desplácese a la izquierda del todo de la barra multitarea. AirPlay AirPlay Volumen Volumen Pasar la reproducción de nuevo al iPad: Pulse y seleccione el iPad. Duplicar la pantalla del iPad en un televisor: Pulse en el extremo izquierdo de la barra multitarea, seleccione un Apple TV y pulse Duplicación. Aparece una barra de color azul en la parte superior de la pantalla del iPad cuando está activada la duplicación de AirPlay. Todo lo que aparezca en el pantalla del iPad se mostrará en el televisor. Conexión del iPad a un televisor mediante un cable Los cables y adaptadores de Apple (disponibles por separado) pueden utilizarse para conectar el iPad a un televisor, proyector u otra pantalla externa. Para obtener más información, vaya a support.apple.com/kb/HT4108?viewlocale=es_ES. Impresión con AirPrint AirPrint le permite imprimir de forma inalámbrica en impresoras compatibles con AirPrint desde las siguientes apps de iOS: • Mail: mensajes de correo electrónico y archivos adjuntos que puedan visualizarse en Vista Rápida • Fotos y Cámara: fotos • Safari: páginas web, archivos PDF y otros tipos de archivos adjuntos que puedan visualizarse en Vista Rápida • iBooks: archivos PDF • Mapas: la parte del mapa que se muestra en la pantalla • Notas: la nota que se muestra en ese momento Es posible que otras apps disponibles en la tienda App Store también sean compatibles con AirPrint. El iPad y la impresora deben estar conectados a la misma red Wi-Fi. Para obtener más información sobre AirPrint, vaya a support.apple.com/kb/HT4356?viewlocale=es_ES.Capítulo 3 Nociones básicas 35 Imprimir un documento: Pulse o (en función de la app que esté usando) y, a continuación, pulse Imprimir. Consultar el estado de una impresión: Haga doble clic en el botón de inicio y, a continuación, pulse Impresión en la barra multitarea. El globo que hay sobre el icono indica el número de documentos listos para imprimirse, incluido el actual. Cancelar una impresión: En Impresión, seleccione la impresión si es necesario y, a continuación, pulse “Cancelar impresión”. Dispositivos Bluetooth Puede utilizar el iPad con el teclado inalámbrico de Apple u otros dispositivos Bluetooth, como auriculares Bluetooth. Para obtener más información, vaya a support.apple.com/kb/HT3647?viewlocale=es_ES. Enlace con dispositivos Bluetooth Para poder utilizar un dispositivo Bluetooth con el iPad, primero debe enlazarlo con el iPad.Capítulo 3 Nociones básicas 36 Enlazar un dispositivo Bluetooth con el iPad: 1 Ponga el dispositivo en modo visible. Consulte la documentación del dispositivo. En el caso de un teclado inalámbrico de Apple, pulse el botón de encendido. 2 Vaya a Ajustes > Bluetooth y active Bluetooth. 3 Seleccione el dispositivo y, si se le solicita, introduzca la clave o el PIN. Consulte las instrucciones relativas a la clave o PIN que vienen con el dispositivo. Para obtener información sobre cómo utilizar un teclado inalámbrico de Apple, consulte Teclado inalámbrico de Apple en la página 28. Para utilizar unos auriculares Bluetooth con el iPad, consulte la documentación del dispositivo. Devolver la salida de audio al iPad al conectar unos auriculares Bluetooth: Apague o desenlace el dispositivo o bien desactive Bluetooth en Ajustes > Bluetooth. La salida de audio volverá al iPad siempre que el dispositivo se encuentre fuera de su alcance. También puede utilizar AirPlay para cambiar la salida de audio al iPad. Consulte AirPlay en la página 33. Estado Bluetooth Tras haber enlazado un dispositivo con el iPad, aparecerá en la barra de estado de la parte superior de la pantalla el icono Bluetooth. • (blanco): Bluetooth está activado y enlazado con un dispositivo. • (gris): Bluetooth está activado y enlazado con un dispositivo, pero el dispositivo está fuera del radio de alcance o apagado. • Sin icono Bluetooth: Bluetooth no está enlazado con un dispositivo. Desenlazar un dispositivo Bluetooth del iPad Puede desenlazar un dispositivo Bluetooth si no va a utilizarlo más con el iPad. Desenlazar un dispositivo Bluetooth: Vaya a Ajustes > Bluetooth y active Bluetooth. Pulse junto al nombre del dispositivo y, a continuación, pulse “Omitir dispositivo”. Compartir Archivos Puede utilizar iTunes para transferir archivos entre el iPad y su ordenador. También puede ver los archivos recibidos como archivos adjuntos de un mensaje de correo electrónico en el iPad. Consulte Lectura de correo electrónico en la página 48. Si tiene las mismas apps compatibles con iCloud en más de un dispositivo, puede utilizar iCloud para disponer automáticamente de las versiones más recientes de sus documentos en todos sus dispositivos. Consulte Cómo usar iCloud en la página 16. Transferir archivos mediante iTunes: Conecte el iPad al ordenador mediante el cable incluido. En iTunes, en su ordenador, seleccione el iPad y, a continuación, haga clic en el botón “Aplic.”. Utilice la sección “Compartir archivos” para transferir documentos entre el iPad y el ordenador. Las apps que permiten compartir archivos se muestran en la lista de apps con archivos compartidos de iTunes. Para eliminar un archivo, selecciónelo en la lista de archivos y, a continuación, pulse la tecla Suprimir.Capítulo 3 Nociones básicas 37 Funciones de seguridad Las funciones de seguridad le permiten evitar que otros accedan a la información en el iPad. Códigos y protección de datos Para mayor seguridad, puede establecer un código que deberá introducir cada vez que se encienda o active el iPad o cuando acceda a los ajustes de bloqueo con código. Al especificar un código, se activa la protección de datos, que utiliza el código como clave para encriptar los mensajes de correo y los documentos adjuntos almacenados en el iPad. (Es posible que otras apps disponibles en la tienda App Store también utilicen la protección de datos.) Un aviso en la parte inferior de la pantalla “Bloqueo con código”, en Ajustes, muestra que la protección de datos está activada. Establecer un código: Vaya a Ajustes > General > “Bloqueo con código”, pulse “Activar código” e introduzca un código de 4 dígitos. Usar un código más seguro: Para aumentar la seguridad, desactive el código simple y use un código más largo con una combinación de números, letras, signos de puntuación y caracteres especiales. Para desbloquear el iPad cuando esté protegido por un código con combinación, deberá introducir el código utilizando el teclado. Si prefiere desbloquear el iPad usando el teclado numérico, puede configurar un código más largo usando solo números. Consulte Bloqueo con código en la página 123. Buscar mi iPad La función “Buscar mi iPad” puede ayudarle a localizar y proteger su iPad mediante la app gratuita “Buscar mi iPhone” desde otro iPad, iPhone o iPod touch, o utilizando un navegador web en un Mac o PC con una sesión iniciada en www.icloud.com. “Buscar mi iPad” incluye: • Reproducir sonido: Reproduce un sonido durante dos minutos. • Modo perdido: Podrá bloquear inmediatamente su iPad, si lo ha perdido, mediante un código y enviarle un mensaje con un número de contacto. El iPad también realiza un seguimiento de su ubicación e informa de ella, para que pueda ver dónde ha estado cuando consulte la app Buscar mi iPhone. • Borrar el iPad: Protege su privacidad eliminando toda la información y los contenidos del iPad y restableciendo sus ajustes de fábrica originales. Importante: Para utilizar estas funciones, debe haberse activado “Buscar mi iPad” en los ajustes de iCloud del iPad, y el iPad debe estar conectado a Internet. Activar “Buscar mi iPad”: Vaya a Ajustes > iCloud y active “Buscar mi iPad”.Capítulo 3 Nociones básicas 38 Batería El iPad tiene en su interior una batería de iones de litio recargable. Para obtener más información sobre la batería (incluidos consejos para ampliar al máximo la duración de la batería), vaya a www.apple.com/es/batteries, www.apple.com/mx/batteries o www.apple.com/la/batteries. ADVERTENCIA: Para obtener información de seguridad importante sobre la batería y sobre cómo cargar el iPad, consulte Información importante sobre seguridad en la página 133. Recargar la batería: La mejor manera de cargar la batería del iPad es conectando el iPad a una toma de corriente mediante el cable y el adaptador de corriente USB incluidos. El iPad seguramente se cargará despacio si lo conecta a un puerto USB 2.0 del ordenador. Si su Mac o PC no proporciona suficiente alimentación para recargar el iPad, en la barra de estado se mostrará el mensaje “No se está cargando”. Importante: La batería del iPad puede descargarse en vez de cargarse si el iPad está conectado a un PC, a un ordenador que está apagado o en estado de reposo, a un hub USB o a un puerto USB de un teclado. El icono de batería de la esquina superior derecha de la barra de estado muestra el nivel de la batería o su estado de carga. Sin cargar Sin cargar Cargando Cargando Cargado Cargado Mostrar el porcentaje de carga de la batería: Vaya a Ajustes > General > Uso y active el ajuste situado bajo “Uso de la batería”. Importante: Si el nivel de batería del iPad es muy bajo puede aparecer una de las siguientes imágenes, lo que indica que el iPad necesita cargarse durante veinte minutos aproximadamente antes de poder utilizarlo. Si el nivel de carga del iPad es muy bajo, la pantalla puede apagarse hasta dos minutos antes de que aparezca una de las imágenes de batería baja. o bien o bien Las baterías recargables pueden recargarse un número limitado de veces, por lo que es posible que llegue un momento en el que deba sustituirlas. Sustituir la batería: El usuario no puede acceder a la batería; únicamente pueden cambiarla proveedores de servicios Apple autorizados. Consulte www.apple.com/es/batteries/replacements.html, www.apple.com/mx/batteries/replacements.html o www.apple.com/la/batteries/replacements.html.4 39 ¿Qué es Siri? Siri es un asistente personal inteligente que le ayuda a realizar operaciones simplemente hablando. Siri entiende el habla natural, de modo que no es necesario que se aprenda comandos específicos ni que recuerde palabras clave. Puede pedir las cosas de distintas formas. Por ejemplo, puede decir “Ajusta la alarma para las 6:30 a.m.” o “Despiértame a las 6:30 de la mañana”. En cualquiera de los dos casos, Siri hará lo que le pide. ADVERTENCIA: Para obtener información importante sobre cómo evitar distracciones al volante, consulte Información importante sobre seguridad en la página 133. Siri le permite escribir y enviar mensajes, programar una reunión, realizar una llamada de FaceTime, obtener indicaciones, establecer un recordatorio, buscar en Internet y muchas cosas más, y todo ello hablando de forma natural. Siri le preguntará si necesita aclaraciones o más información Siri también utiliza la información de sus contactos, biblioteca musical, calendarios, recordatorios, etc., para saber de qué está hablando. Siri funciona sin problemas con la mayoría de las apps integradas en el iPad y, cuando es necesario, utiliza las funciones Buscar y Localización. También le puede pedir a Siri que abra una app. Hay muchas cosas que puede indicarle a Siri. A continuación se incluyen algunos ejemplos para principiantes: • FaceTime a José • Ajusta el temporizador a 30 minutos • Indicaciones para la tienda Apple más cercana • ¿Va a llover mañana? • Publica en Facebook • Publica en Twitter. Nota: Siri está disponible en el iPad de tercera generación o posterior y requiere acceso a Internet. Siri puede no estar disponible en todos los idiomas o en todas las regiones, y sus funciones pueden variar. Pueden aplicarse tarifas de datos de telefonía móvil. Cómo utilizar Siri Cómo iniciar Siri Siri se activa pulsando un botón. Iniciar Siri: Pulse el botón de inicio hasta que aparezca Siri. Si no activó Siri al configurar el iPad, vaya a Ajustes > General > Siri. SiriCapítulo 4 Siri 40 Escuchará dos pitidos rápidos y verá “¿En qué te puedo ayudar?” en la pantalla. Simplemente comience a hablar. El icono de micrófono se iluminará para indicarle que Siri le está escuchando. Una vez que haya empezado a dialogar con Siri, pulse el icono de micrófono para volver a hablar. Siri esperará a que termine de hablar, pero también puede pulsar el icono del micrófono para indicar a Siri que ya ha terminado. Esto resultará de gran utilidad cuando haya mucho ruido de fondo. También permite acelerar su conversación con Siri, puesto que Siri no tendrá que esperar ninguna pausa en su discurso. Cuando termine de hablar, Siri le mostrará lo que ha entendido y le ofrecerá una respuesta. Siri suele incluir información relacionada que puede resultar útil. Si la información está relacionada con una app (por ejemplo, un mensaje de texto que ha redactado o una ubicación por la que ha preguntado) simplemente pulse la pantalla para abrir la app a fin de obtener más detalles y nuevas acciones. Información relacionada; pulse para abrir la app. Información relacionada; pulse para abrir la app. Lo que ha entendido Siri Lo que ha entendido Siri Respuesta de Siri Respuesta de Siri Pulse para hablar a Siri. Pulse para hablar a Siri. Es posible que Siri le pida alguna aclaración para completar alguna petición. Por ejemplo, si le dice a Siri “Recuérdame que llame a Mamá ”, Siri puede preguntarle: “¿A qué hora quieres que te lo recuerde?” Cancelar una petición: Diga “cancelar”, pulse o pulse el botón de inicio . Hable a Siri sobre usted Cuanto más sepa Siri sobre usted, más podrá usar su información para ayudarle. Siri obtiene su información de su tarjeta de información personal (“Mis datos”) en Contactos. Dígale a Siri quién es usted: Vaya a Ajustes > General > Siri > “Mis datos” y, a continuación, pulse su nombre. Ponga la dirección de su casa y del trabajo en la tarjeta, de modo que pueda decir cosas como “Dime cómo llegar a casa”. Capítulo 4 Siri 41 Siri también quiere conocer a la gente importante en su vida, así que ponga esas relaciones en un tarjeta de información personal. Siri puede ayudarle. Por ejemplo, si pide a Siri que envíe un mensaje de texto a su hermana, Siri le preguntará quién es su hermana (si no lo ha indicado ya en su tarjeta). Siri añadirá esa relación a su tarjeta de información personal para no tener que volver a preguntar. Cree tarjetas en Contactos para todas sus relaciones importantes e incluya información como números de teléfono, direcciones de correo electrónico, direcciones del hogar y del trabajo, y sobrenombres que desee utilizar. Manual en pantalla Siri le ofrece ejemplos de frases que puede decir, directamente en la pantalla. Pregunte a Siri “¿qué puedes hacer?” o pulse cuando Siri aparezca. Siri mostrará una lista de las apps que admite, con una petición de ejemplo. Pulse un ítem de la lista para ver más ejemplos. Siri con manos libres Puede utilizar Siri con unos auriculares compatibles, como los auriculares EarPods de Apple con mando y micrófono (disponibles por separado), u otros auriculares con cable o Bluetooth. Hablar a Siri con unos auriculares: Mantenga pulsado el botón central (o el botón de llamada de unos auriculares Bluetooth). Para continuar una conversación con Siri, mantenga pulsado el botón cada vez que desee hablar. Cuando utilice auriculares, Siri le comunicará sus respuestas con voz. Siri repite los mensajes de texto y mensajes de correo electrónico dictados antes de enviarlos. De esta forma, tiene la oportunidad de cambiar un mensaje de texto si lo desea. Siri también repite los asuntos de los recordatorios antes de crearlos. Localización Puesto que Siri conoce ubicaciones como “actual”, “casa” y “trabajo” (si su iPadWi-Fi + cellular admite esta función), puede recordarle que haga una determinada tarea cuando abandone un lugar o cuando llegue a otro. Dígale a Siri “Recuérdame que llame a mi hija cuando salga de la oficina”, y Siri lo hará. No se realiza un seguimiento de la información de localización y dicha información tampoco se almacena fuera del iPad. Podrá seguir utilizando Siri con los servicios de localización desactivados, pero Siri no hará nada que requiera información de localización. Desactivar la función Localización para Siri: Vaya a Ajustes > Privacidad > Localización.Capítulo 4 Siri 42 Accesibilidad Siri es accesible a usuarios ciegos y con problemas de visión a través de VoiceOver, el lector de pantalla integrado en el iOS. VoiceOver describe en voz alta lo que hay en la pantalla (incluido el texto de las respuestas de Siri) para que pueda utilizar el iPad sin verlo. Activar VoiceOver: Vaya a Ajustes > General > Accesibilidad. La activación de VoiceOver hace que incluso sus notificaciones se lean en voz alta. Para obtener más información, consulte VoiceOver en la página 103. Cómo ajustar las opciones de Siri Activar o desactivar Siri: Vaya a Ajustes > General > Siri. Nota: Si desactiva Siri, la aplicación se restablecerá y olvidará todo lo que ha aprendido sobre su voz. Ajustar opciones para Siri: Vaya a Ajustes > General > Siri. • Idioma: Seleccione el idioma que desee utilizar con Siri. • Mensajes de voz: Por omisión, Siri responde hablando solo cuando lo utiliza con auriculares. Si quiere que Siri siempre responda hablando, ajuste esta opción a Siempre. • Mis datos: Indique a Siri qué tarjeta de Contactos contiene su información personal. Consulte Hable a Siri sobre usted en la página 40. Permitir o impedir el acceso a Siri cuando el iPad está bloqueado mediante un código: Vaya a Ajustes > General > Bloqueo con código. También puede desactivar Siri activando restricciones. Consulte Restricciones en la página 123. Restaurantes Siri funciona con Yelp, OpenTable y otros servicios para facilitarle información sobre restaurantes y ayudarle a realizar reservas. Pregunte para buscar restaurantes por tipo de comida, precio, ubicación, terraza o una combinación de diferentes opciones. Siri podrá mostrar las fotos disponibles, las estrellas Yelp, el intervalo de precios y las reseñas. Obtenga más información con las apps Yelp y OpenTable (el iPad le indicará que las descargue si aún no las tiene instaladas). Ver información detallada de un restaurante: Pulse un restaurante sugerido por Siri. Llame al restaurante. Llame al restaurante. Visite el sitio web. Visite el sitio web. Haga una reserva a través de OpenTable. Haga una reserva a través de OpenTable. Vea las opiniones de Yelp. Vea las opiniones de Yelp.Capítulo 4 Siri 43 Películas Pregunte a Siri qué películas están en cartelera o dónde puede ver una determinada película. Averigüe cuándo se estrenó una película, quién la dirigió y qué galardones obtuvo. Siri proporciona las direcciones de los cines y muestra los horarios de las proyecciones y las reseñas de Rotten Tomatoes. Ver información detallada de una película: Pulse una película sugerida por Siri. Vea el tráiler. Vea el tráiler. Lea las reseñas de Rotten Tomatoes. Lea las reseñas de Rotten Tomatoes. Deportes Siri sabe mucho de deportes: béisbol, baloncesto, fútbol, fútbol americano y hockey. Pregunte a Siri el calendario de partidos, los resultados de los partidos de la temporada actual o los resultados al minuto de los partidos que se están jugando. Dígale a Siri que le muestre las estadísticas de los jugadores y que las compare con las de otros jugadores. Siri también hace un seguimiento de las trayectorias de los equipos. Estas son algunas de las cosas que puede preguntar: • What was the score of the last Giants game? • What are the National League standings? • When is the Chicago Cubs first game of the season? Dictado Si Siri está activado, también puede dictar texto. Consulte Dictado en la página 29. Aunque puede redactar mensajes de correo electrónico, mensajes de texto y otros tipos de texto hablando directamente con Siri, es posible que prefiera dictarlos. La función de dictado le permite editar un mensaje en lugar de reemplazar todo el texto. La función de dictado también le da más tiempo para pensar mientras redacta. Siri entiende que una pausa significa que ha terminado de hablar por el momento y aprovecha la ocasión para responder. Aunque esto le permite entablar una conversación natural con Siri, Siri podría interrumpirle antes de que realmente hubiese acabado si hace una pausa demasiado larga. Con la función de dictado, puede detenerse todas las veces que quiera y seguir hablando cuando esté preparado. También puede empezar a redactar un texto utilizando Siri y seguir utilizando la función de dictado. Por ejemplo, puede crear un mensaje de correo electrónico con Siri y, a continuación, pulsar el borrador para abrir el mensaje en Mail. En Mail, puede completar o editar el mensaje y realizar otros cambios, como añadir o eliminar destinatarios, revisar el asunto o cambiar la cuenta desde la que está enviando los mensajes de correo electrónico.Capítulo 4 Siri 44 Cómo corregir a Siri Si Siri tiene problemas En ocasiones, Siri puede tener problemas para entenderle, por ejemplo, si hay ruido a su alrededor. Si habla con acento, Siri puede tardar un tiempo en acostumbrarse a su voz. Si Siri no le escucha con precisión, puede hacer correcciones. Siri le mostrará lo que le ha entendido decir, junto con su respuesta. Corregir lo que Siri piensa que usted está diciendo: Pulse el globo donde se muestra lo que Siri piensa que usted ha dicho. Edite su petición por escrito o pulse en el teclado para dictarla. Para obtener información sobre la forma de utilizar la función de dictado, consulte Dictado en la página 29. Si parte del texto aparece subrayada en azul, púlsela para que Siri le sugiera alternativas. Pulse una de las sugerencias o reemplace el texto escribiendo o dictando texto nuevo. Corregir a Siri hablando: Pulse y, a continuación, vuelva a plantear o aclare su petición. Por ejemplo, “Quería decir Huesca”. Al corregir a Siri, no diga lo que no quiere, sino lo que sí quiere. Corregir un mensaje de correo o un mensaje de texto: Si Siri le pregunta si desea enviar el mensaje, diga algo como: • Cámbialo a: Llámame mañana. • Añade: Nos vemos allí signo de interrogación. • No, envíaselo a Nacho. • No. (para no enviar el mensaje) • Cancelar. Para que Siri le lea el mensaje, diga “Léemelo” o “Léeme el mensaje”. Si es correcto, diga algo como “Sí, envíalo”. Entornos ruidosos En un entorno ruidoso, mantenga el iPad cerca de la boca, pero no hable directamente sobre el borde inferior. Siga hablando de forma clara y natural. Cuando termine de hablar, pulse . Conexión de red Es posible que Siri le indique que está teniendo problemas para conectarse a la red. Puesto que Siri depende de los servidores de Apple para el reconocimiento de voz y otros servicios, deberá disponer de una buena conexión de telefonía móvil 3G, 4G o LTE o de una buena conexión Wi-Fi a Internet. 5 45 Entre las funciones de Safari se incluyen las siguientes: • Lector: vea artículos sin anuncios ni estorbos • Lista de lectura: coleccione artículos para leerlos más tarde • Modo de pantalla completa: al visualizar páginas web en orientación horizontal Use iCloud para ver páginas que tenga abiertas en otros dispositivos, y para mantener actualizados sus favoritos y su lista de lectura en sus demás dispositivos. Vea sus favoritos, historial o lista de lectura. Vea sus favoritos, historial o lista de lectura. Abrir una página nueva. Abrir una página nueva. Buscar en Internet y en la página actual. Buscar en Internet y en la página actual. Introducir una dirección web (URL). Introducir una dirección web (URL). Pulse un ítem dos veces o separe o junte los dedos para acercar o alejar la imagen. Pulse un ítem dos veces o separe o junte los dedos para acercar o alejar la imagen. Ver una página web: Pulse el campo de dirección (en la barra de título), introduzca la URL y, a continuación, pulse Ir. • Desplazarse por una página web: Arrastre hacia arriba, hacia abajo o lateralmente. • Desplazarse dentro de un marco: Arrastre dos dedos en el interior del marco. • Volver a cargar una página web: Pulse en el campo de dirección. Cerrar una página web: Pulse en la pestaña de la página. Ver otra página web abierta: Pulse una pestaña en la parte superior de la página. SafariCapítulo 5 Safari 46 Volver a abrir una página web cerrada recientemente: Mantenga pulsado y, después, pulse un ítem de la lista. Ver páginas web que ha abierto en sus otros dispositivos: Pulse . Para compartir las páginas web que ha abierto en el iPad con los demás dispositivos a través de “Pestañas iCloud”, vaya a Ajustes > iCloud y active Safari. Seguir un enlace de una página web: Pulse el enlace. • Ver el destino de un enlace: Mantenga pulsado el enlace. • Abrir un enlace en una pestaña nueva: Mantenga pulsado el enlace y, a continuación, pulse “Abrir en una pestaña nueva”. Los datos detectados —como números de teléfono y direcciones de correo electrónico— también pueden aparecer como enlaces en páginas web. Mantenga pulsado un enlace para ver las opciones disponibles. Ver un artículo en el Lector: Pulse el botón Lector si aparece en el campo de dirección. • Ajustar el tamaño de letra: Pulse . • Compartir el artículo: Pulse . Nota: Al enviar por correo electrónico un artículo desde Lector, se envía el texto completo del artículo, además del enlace. • Volver al modo de visualización normal: Pulse Lector. Utilice la lista de lectura para recopilar páginas web que desee leer más tarde: • Añadir la página web actual: Pulse y, a continuación, pulse “Añadir a la lista de lectura”. Con el iPad 2 o posterior, se guardará la página web además del enlace, para poder leerlo incluso si no puede conectarse a Internet. • Añadir el destino de un enlace: Mantenga pulsado el enlace y, a continuación, pulse “Añadir a la lista de lectura”. • Ver la lista de lectura: Pulse y, a continuación, pulse . • Eliminar un ítem de su lista de lectura: Desplace el ítem y, a continuación, pulse Eliminar. Rellenar un formulario: Pulse un campo de texto para mostrar el teclado. • Desplazarse a otro campo de texto: Pulse el campo de texto, o pulse Siguiente o Anterior. • Enviar un formulario: Pulse Ir, Buscar, o el enlace de la página web para enviar el formulario. • Activar el autorrelleno: Vaya a Ajustes > Safari > Autorrelleno. Realizar búsquedas en Internet, en la página web actual o en un PDF con capacidad de búsqueda: Introduzca texto en el campo Buscar. • Buscar en Internet: Pulse una de las sugerencias que aparecen o pulse Buscar. • Buscar el texto objeto de la búsqueda en la página web o PDF actual: Desplácese a la parte inferior de la pantalla y, a continuación, pulse la entrada situada bajo “En esta página”. La primera aparición se mostrará resaltada. Para buscar apariciones posteriores, pulse . Guardar la página web actual como favorito: Pulse y, a continuación, pulse Favorito. Al guardar un favorito, podrá editar su título. Por omisión, los favoritos se guardan en el nivel superior de Favoritos. Para seleccionar otra carpeta, pulse Favoritos. Mostrar la barra de favoritos: Pulse el campo de dirección. Para que la barra de favoritos se muestre siempre, vaya a Ajustes > Safari, bajo General.Capítulo 5 Safari 47 Crear un icono en la pantalla de inicio: Pulse y, a continuación, pulse “Añadir a pantalla inicio”. Safari añade un icono para la página web actual en su pantalla de inicio. La imagen también se utiliza para el icono del clip web en la pantalla de inicio, salvo que la página web disponga de su propio icono personalizado. iCloud y iTunes realizan una copia de seguridad de los clips web, pero estos no se transfieren a otros dispositivos mediante iCloud ni se sincronizan con iTunes. Usar iCloud para mantener sus favoritos y listas de lectura actualizados en sus otros dispositivos iOS: Vaya a Ajustes > iCloud y, a continuación, active Safari. Consulte Cómo usar iCloud en la página 16. Ajustar las opciones de Safari: Vaya a Ajustes > Safari. Entre las opciones se incluyen: • motor de búsqueda; • Autorrelleno para rellenar formularios; • apertura de enlaces en una nueva página web, o en segundo plano; • navegación privada para ayudar a proteger la información privada y bloquear el seguimiento de su navegación por parte de algunos sitios web; • limpieza del historial, las cookies y los datos; • Datos móviles para la lista de lectura • Aviso de fraude6 48 Lectura de correo electrónico Escriba un mensaje. Escriba un mensaje. Cambie de buzón o cuenta. Cambie de buzón o cuenta. Elimine, traslade o marque varios mensajes. Elimine, traslade o marque varios mensajes. Busque en este buzón. Busque en este buzón. Cambie la longitud de la previsualización en Ajustes > Correo, contactos, calendarios. Cambie la longitud de la previsualización en Ajustes > Correo, contactos, calendarios. Marcar un mensaje con un indicador o marcarlo como no leído: Pulse . Para marcar varios mensajes al mismo tiempo, pulse Editar mientras ve la lista de mensajes. Identificar mensajes dirigidos específicamente a usted: Vaya a Ajustes > “Correo, contactos, calendarios” y, a continuación, active o desactive “Etiqueta Para/Cc”. Los mensajes con su dirección en los campos Para o Cc se indican con un icono en la lista de mensajes. Ver todos los destinatarios de un mensaje: Pulse la palabra Detalles en el campo De. Pulse el nombre o dirección de correo electrónico de un destinatario para ver la información de contacto del mismo o para añadirlo a Contactos o a su lista VIP. Impedir la descarga remota de imágenes: Vaya a Ajustes > “Correo, contactos, calendarios” y, a continuación, active o desactive “Cargar imágenes”. Abrir un enlace: Pulse el enlace para ejecutar su acción por omisión o manténgalo pulsado para ver otras acciones. Por ejemplo, para una dirección, puede mostrar su ubicación en Mapas o añadirla a Contactos. Puede añadir un enlace web a la Lista de lectura. MailCapítulo 6 Mail 49 Abrir una invitación a una reunión o un archivo adjunto: Pulse el ítem. Si el archivo adjunto pueden utilizarlo varias apps, manténgalo pulsado para seleccionar una app compatible con el archivo. Guardar una foto o un vídeo adjunto: Mantenga pulsada la foto o el vídeo y, a continuación, pulse “Guardar imagen” o “Guardar vídeo”. Se guardará en el álbum Carrete de la app Fotos. Cargar nuevos mensajes: Despliegue la lista de mensajes o de buzones para actualizar la lista. • Ajustar el número de mensajes antiguos recuperados: Vaya a Ajustes > “Correo, contactos, calendarios” > Mostrar. Desactivar la notificación de nuevos mensajes para una cuenta. Vaya a Ajustes > Notificaciones > Correo > nombre de cuenta y, a continuación, desactive “Centro de notificaciones”. Cambiar los sonidos reproducidos por Mail: Vaya a Ajustes > Sonidos. • Cambiar el sonido reproducido para el correo nuevo en cada cuenta: Vaya a Ajustes > Notificaciones > Correo > nombre de cuenta > Sonido de correo nuevo. • Cambiar el sonido reproducido para el correo nuevo VIP: Vaya a Ajustes > Notificaciones > Correo> VIP > Sonido de correo nuevo. Envío de correo electrónico Cambie su firma en Ajustes > Correo, contactos, calendarios. Cambie su firma en Ajustes > Correo, contactos, calendarios. Pulse para cambiar los campos De, Cc o Cco. Pulse para cambiar los campos De, Cc o Cco. Redactar un mensaje: Pulse y, a continuación, introduzca un nombre o dirección de correo electrónico. Después de introducir los destinatarios, puede arrastrarlos entre campos, por ejemplo, de Para a Cc. Si tiene varias cuentas de correo, pulse De para cambiar la cuenta desde la que desea enviar el mensaje. Copiarse automáticamente en los mensajes salientes: Vaya a Ajustes > Correo, contactos, calendarios > Añadirme a Cco. Guardar un borrador de un mensaje: Pulse Cancelar y, a continuación, pulse “Guardar borrador”. Mantenga pulsado para ver los borradores guardados. Responder a un mensaje: Pulse y, a continuación, pulse Responder. Los archivos o imágenes adjuntos al mensaje inicial no se reenvían. Para incluir los archivos adjuntos, reenvíe el mensaje en lugar de responder al mismo. Reenviar un mensaje: Abra un mensaje, pulse y, después, pulse Reenviar. Esta opción también reenvía los archivos adjuntos del mensaje.Capítulo 6 Mail 50 Citar parte del mensaje al que está respondiendo o que está reenviando: Mantenga el dedo sobre el texto para seleccionarlo. Arrastre los puntos de selección para seleccionar el texto que desee incluir en su respuesta y, a continuación, pulse . • Cambiar el nivel de sangría: Seleccione el texto a sangrar, pulse al menos dos veces y, a continuación, pulse “Nivel de cita”. • Aumentar automáticamente el nivel de sangrado: Vaya a Ajustes > “Correo, contactos, calendarios” y active “Aumentar nivel de cita”. Enviar una foto o un vídeo en un mensaje: Pulse el punto de inserción y aparecerán los botones de selección. A continuación, pulse “Insertar foto o vídeo” y seleccione una foto o un vídeo de un álbum. También puede enviar varias fotos por correo electrónico mediante Fotos. Consulte Cómo compartir fotos y vídeos en la página 64. Cambiar su firma de correo electrónico: Vaya a Ajustes > “Correo, contactos, calendarios” > Firma. Si tiene más de una cuenta de correo electrónico, pulse “Por cuenta” para especificar una firma distinta para cada una. Organización del correo Ver mensajes de los VIP: Vaya a la lista de buzones (pulse Buzones para llegar a ella) y pulse VIP. • Añadir una persona a la lista VIP: Pulse el nombre o la dirección de la persona en un campo De, Para o Cc/Cco y, a continuación, pulse “Añadir a lista VIP”. Agrupar los mensajes relacionados: Vaya a Ajustes > “Correo, contactos, calendarios” y, a continuación, active o desactive “Organizar cadenas”. Buscar mensajes: Abra un buzón y, a continuación, introduzca texto en el campo de búsqueda. Puede buscar en los campos De y Para, o en el campo Asunto del buzón abierto en ese momento. En las cuentas de correo que permiten realizar búsquedas en los mensajes almacenados en el servidor, pulse Todo para buscar en De, Para y Asunto, y en el cuerpo del mensaje. Eliminar un mensaje: Si el mensaje está abierto, pulse . • Eliminar un mensaje sin abrirlo: Deslice un dedo sobre el título del mensaje y, a continuación, pulse Eliminar. • Eliminar varios mensajes: Mientras ve la lista de mensajes, pulse Editar. • Desactivar la confirmación de eliminación: Vaya a Ajustes > Correo, contactos, calendarios > Preguntar al borrar. Recuperar un mensaje: Vaya al buzón Papelera de la cuenta, abra el mensaje, pulse y, a continuación, traslade el mensaje a la bandeja de entrada de la cuenta o a otra carpeta. • Ajustar el tiempo que se conservan los mensajes eliminados en la Papelera antes de su eliminación definitiva: Vaya a Ajustes > Correo, contactos, calendarios > nombre de cuenta > Cuenta > Avanzado. Activar o desactivar el archivado: Vaya a Ajustes > Correo, contactos, calendarios > nombre de cuenta > Cuenta > Avanzado. Al archivar un mensaje, se traslada al buzón Todos. No todas las cuentas de correo permiten archivar mensajes. Trasladar un mensaje a otro buzón: Mientras visualiza el mensaje, pulse y, a continuación, seleccione un destino. Añadir, renombrar o eliminar un buzón: En la lista de buzones, pulse Editar. Algunos buzones no pueden cambiarse o editarse.Capítulo 6 Mail 51 Impresión de mensajes y archivos adjuntos Imprimir un mensaje: Pulse y, a continuación, pulse Imprimir. Imprimir una imagen integrada: Mantenga pulsada la imagen y, a continuación, pulse “Guardar imagen”. Vaya a Fotos e imprima la imagen desde el álbum Carrete. Imprimir un archivo adjunto: Pulse el archivo adjunto para abrirlo en Vista Rápida y, a continuación, pulse y pulse Imprimir. Para obtener más información, consulte Impresión con AirPrint en la página 34. Cuentas de correo y ajustes de Mail Cambiar los ajustes de Mail y de las cuentas de correo: Vaya a Ajustes > “Correo, contactos, calendarios”. Puede configurar: • iCloud • Microsoft Exchange y Outlook • Google • Yahoo! • AOL • Microsoft Hotmail • Otras cuentas de correo POP e IMAP Los ajustes pueden variar según el tipo de cuenta que configure. Su proveedor de servicios de Internet o administrador del sistema puede facilitarle la información que debe introducir. Dejar de utilizar una cuenta temporalmente: Vaya a Ajustes > “Correo, contactos, calendarios”, seleccione una cuenta y, a continuación, desactive el servicio de correo de la cuenta. Si el servicio está desactivado, el iPad no mostrará ni sincronizará dicha información hasta que vuelva a activarlo. Es una buena forma de dejar de recibir mensajes de trabajo en vacaciones, por ejemplo. Eliminar una cuenta: Vaya a Ajustes > “Correo, contactos, calendarios”, seleccione una cuenta y, a continuación, desplácese hacia abajo y pulse “Eliminar cuenta”. Se eliminará toda la información sincronizada con dicha cuenta (los favoritos, el correo, las notas, etc.). Definir ajustes de Push: Vaya a Ajustes > Correo, contactos, calendarios > “Obtener datos”. La tecnología Push envía la información nueva en cuanto aparece en el servidor y hay una conexión a Internet (puede haber un retardo). Cuando “push” está desactivado, el uso del ajuste “Obtener datos” determina con qué regularidad se solicita esta información. El ajuste que seleccione aquí anulará los ajustes de las cuentas individuales. Para ahorrar batería, es recomendable no obtener información demasiado a menudo. No todas las cuentas de correo son compatibles con push. Enviar mensajes firmados y encriptados: Vaya a Ajustes > “Correo, contactos, calendarios”, seleccione una cuenta y, a continuación, pulse Avanzado. Active “S/MIME” y, a continuación, seleccione certificados para firmar y encriptar los mensajes salientes. Para instalar certificados, puede obtener un perfil de configuración de su administrador del sistema, descargar los certificados del sitio web del emisor utilizando Safari, o bien recibirlos en archivos adjuntos de correo.Capítulo 6 Mail 52 Ajustar opciones avanzadas: Vaya a Ajustes > Correo, contactos, calendarios > nombre de cuenta > Cuenta > Avanzado. Las opciones varían según la cuenta, y pueden incluir: • Almacenar borradores, mensajes enviados y mensajes eliminados en el iPad • ajustar el tiempo que se conservan los mensajes eliminados antes de su eliminación definitiva; • definir los ajustes del servidor de correo; • configurar los ajustes de SSL y de contraseña. Pregunte a su administrador del sistema o proveedor de servicios de Internet si no está seguro de cuáles son los ajustes adecuados para su cuenta.7 53 Cómo enviar y recibir mensajes ADVERTENCIA: Para obtener información importante sobre cómo evitar distracciones al volante, consulte Información importante sobre seguridad en la página 133. Con la app Mensajes y el servicio integrado iMessage, puede enviar mensajes de texto ilimitados a través de conexiones Wi-Fi o conexiones de datos de telefonía móvil a otros usuarios de iOS y OS X Mountain Lion. Los mensajes pueden incluir fotos, vídeos y otros tipos de datos. Podrá ver si la otra persona está escribiendo y podrá informarle cuando haya leído sus mensajes. Los mensajes de iMessage se muestran en todos los dispositivos con iOS conectados a la misma cuenta, de modo que pueda iniciar una conversación con uno de los dispositivos y seguirla en otro. Además, los mensajes de iMessage se encriptan para mayor seguridad. Nota: Pueden aplicarse tarifas de datos de telefonía móvil. Pulse el botón de edición para editar o reenviar una conversación. Pulse el botón de edición para editar o reenviar una conversación. Pulse el botón de redacción para iniciar una nueva conversación. Pulse el botón de redacción para iniciar una nueva conversación. Pulse el botón “Adjuntar contenido multimedia” para incluir una foto o un vídeo. Pulse el botón “Adjuntar contenido multimedia” para incluir una foto o un vídeo. MensajesCapítulo 7 Mensajes 54 Iniciar una conversación con mensajes de texto: Pulse y, a continuación, pulse y seleccione un contacto, busque en sus contactos introduciendo un nombre, o introduzca un número de teléfono o una dirección de correo electrónico manualmente. Escriba un mensaje y pulse Enviar. Nota: Si no es posible enviar un mensaje, aparecerá una alerta . Pulse la alerta para obtener más información o para intentar enviar el mensaje de nuevo. Reanudar una conversación: Pulse la conversación en la lista Mensajes. Ocultar el teclado: Pulse en la esquina inferior derecha. Utilizar caracteres de imagen: Vaya a Ajustes > General > Teclado > Teclados > Añadir nuevo teclado y, a continuación, pulse Emoji para hacer que esté disponible ese teclado. Posteriormente, mientras escriba un mensaje, pulse para mostrar el teclado Emoji. Consulte Métodos de entrada especiales en la página 131. Ver la información de contacto de una persona: Pulse . Desplácese hasta la parte inferior del panel Información para ver las acciones que puede realizar, como hacer una llamada de FaceTime. Consultar los mensajes anteriores de la conversación: Desplácese hasta la parte superior (pulse la barra de estado). Si es necesario, pulse “Cargar mensajes anteriores”. Enviar mensajes a un grupo: Pulse y, a continuación, introduzca varios destinatarios. Gestión de conversaciones Las conversaciones se guardan en la lista Mensajes. Un punto azul indica los mensajes sin leer. Pulse una conversación para verla o continuar con ella. Reenviar una conversación: Seleccione la conversación y pulse , seleccione las partes de la conversación que desee incluir y pulse Reenviar. Editar una conversación: Seleccione la conversación y pulse , seleccione las partes de la conversación que desee incluir y pulse Eliminar. Para borrar todos los mensajes y archivos adjuntos sin eliminar la conversación, pulse “Borrar todo”. Eliminar una conversación: En la lista Mensajes, deslice el dedo sobre la conversación y, a continuación, pulse Eliminar. Buscar una conversación: Desplácese hasta el principio de la lista Mensajes para mostrar el campo de búsqueda y, a continuación, introduzca su búsqueda. También puede buscar conversaciones desde la pantalla de inicio. Consulte Cómo buscar en la página 30. Añadir una persona a su lista de contactos o compartir un contacto: Pulse un número de telé- fono o una dirección de correo electrónico en la lista Mensajes y, a continuación, pulse . Cómo enviar fotos, vídeos y otros contenidos Puede enviar fotos, vídeos, ubicaciones, datos de contacto y notas de voz. El límite de tamaño de los archivos adjuntos viene determinado por su proveedor de servicios. El iPad puede comprimir los archivos de foto o vídeo adjuntos en caso necesario. Enviar una foto o vídeo: Pulse . Enviar una ubicación: En Mapas, pulse de una ubicación, pulse “Compartir ubicación” y, por último, pulse Mensaje.Capítulo 7 Mensajes 55 Enviar información de contacto: En Contactos, seleccione un contacto, pulse “Compartir contacto” (debajo de Notas) y, a continuación, pulse Mensaje. Guardar una foto o un vídeo recibido en el álbum Carrete: Pulse la foto o el vídeo, pulse y, a continuación, pulse “Guardar imagen”. Copiar una foto o vídeo: Mantenga pulsado el archivo adjunto y, a continuación, pulse Copiar. Guardar la información de contacto recibida: Pulse la burbuja de contacto y, a continuación, pulse “Nuevo contacto” o “Contacto existente”. Añadir una persona a sus contactos desde la lista Mensajes: Pulse el número de teléfono o la dirección de correo electrónico y, a continuación, pulse “Añadir contacto”. Ajustes de mensajes Vaya a Ajustes > Mensajes para ajustar las opciones de Mensajes, tales como: • activar o desactivar iMessage; • notificar a otras personas que ha leído sus mensajes; • especificar un número de teléfono, ID de Apple o dirección de correo electrónico para usar con Mensajes. • mostrar el campo Asunto; Gestionar las notificaciones de los mensajes: Consulte “No molestar” y notificaciones en la página 120. Ajustar el sonido de alerta de los mensajes de texto entrantes: Consulte Sonidos en la página 126.8 56 En un iPad 2 o posterior, podrá utilizar FaceTime para realizar videollamadas a otros dispositivos iOS u ordenadores que admitan FaceTime. La cámara FaceTime le permite hablar cara a cara; cambie a la cámara iSight en la parte trasera para compartir lo que ve a su alrededor. Nota: Es posible que FaceTime no esté disponible en todas las áreas. En modelos iPad Wi-Fi + cellular, las videollamadas con FaceTime pueden realizarse con una conexión de datos móviles. Pueden aplicarse tarifas de datos de telefonía móvil. Arrastrar la imagen a cualquier esquina. Arrastrar la imagen a cualquier esquina. Cambiar de cámara. Cambiar de cámara. Silenciar (puede ver y oír; la persona que realiza la llamada puede ver pero no oír). Silenciar (puede ver y oír; la persona que realiza la llamada puede ver pero no oír). Para utilizar FaceTime, necesita un ID de Apple y una conexión Wi-Fi a Internet. Cuando abra FaceTime, es posible que se le solicite que inicie sesión con su ID de Apple, o que cree una nueva cuenta. Realizar una llamada FaceTime: Pulse Contactos, seleccione un nombre y, a continuación, pulse el número de teléfono o la dirección de correo electrónico que esa persona utilice para FaceTime. También puede realizar una llamada FaceTime desde la app Contactos. Gire el iPad para utilizar FaceTime en orientación vertical u horizontal. Para evitar cambios de orientación no deseados, bloquee el iPad en orientación vertical. Consulte Orientación vertical u horizontal en la página 22. Reiniciar una llamada reciente: Pulse Recientes y seleccione un nombre o número. FaceTimeCapítulo 8 FaceTime 57 Usar Favoritos: Pulse Favoritos. • Añadir un favorito: Pulse y seleccione un contacto. • Llamar a un favorito: Pulse un nombre de la lista. Añadir un contacto: Pulse Contactos, pulse y, a continuación, escriba el nombre y la dirección de correo electrónico o el número de teléfono que esa persona utilice para FaceTime. En el caso de los contactos que no se encuentren en su país, introduzca el número completo, con los prefijos de país y área correspondientes. Utilizar otra app durante una llamada: Pulse el botón de inicio y, a continuación, pulse el icono de una app. Podrá seguir hablando con su interlocutor, pero ya no se verán. Para volver al vídeo, pulse la barra de color verde situada en la parte superior de la pantalla. Ajustar opciones para FaceTime: Vaya a Ajustes > FaceTime. Entre las opciones se incluyen la especificación de un número de teléfono, ID de Apple o dirección de correo electrónico para usar con FaceTime.9 58 Visión general Si tiene un iPad 2 o una versión posterior, puede realizar fotos y vídeos. Además de la cámara iSight en la parte trasera, existe una cámara FaceTime en la parte delantera para llamadas de FaceTime y autorretratos. Vea las fotos y los vídeos realizados. Vea las fotos y los vídeos realizados. Inicie o detenga la grabación de vídeo. Inicie o detenga la grabación de vídeo. Interruptor Cámara/Vídeo Interruptor Cámara/Vídeo Aparece brevemente un rectángulo en el área de la imagen que la cámara tiene enfocada y en la que ajusta la exposición. Cuando se fotografía a personas, el iPad (tercera generación) utiliza la función de detección de caras para enfocar automáticamente y ajustar la exposición para un máximo de 10 caras. Aparece un rectángulo sobre cada cara detectada. Hacer una foto: Pulse o pulse cualquiera de los botones de volumen. Para ver una cuadrícula en la pantalla, pulse Opciones. • Acercar o alejar la imagen: Pellizque la pantalla (solo cámara iSight). Grabar un vídeo: Cambie a y, a continuación, pulse o pulse cualquiera de los botones de volumen para iniciar o detener la grabación. Cuando hace una foto o empieza la grabación de un vídeo, el iPad emite un sonido de obturador. Puede controlar el volumen con los botones de volumen o con el interruptor lateral. Nota: En algunos países, silenciar el iPad no impide que suene el obturador. CámaraCapítulo 9 Cámara 59 Si la función de localización está activada, las fotos y los vídeos se etiquetarán con datos de localización que podrán utilizarse en otras apps y sitios web que permiten compartir fotos. Consulte Privacidad en la página 127. Ajustar el enfoque y la exposición: • Ajustar el enfoque y la exposición para la siguiente captura: Pulse el objeto que aparece en la pantalla. La detección de rostros está temporalmente desactivada. • Bloquear el enfoque y la exposición: Mantenga pulsada la pantalla hasta que el rectángulo oscile. En la parte inferior de la pantalla aparece “Bloqueo de AE/AF”, y el enfoque y la exposición permanecen bloqueados hasta que vuelva a pulsar la pantalla. Hacer una captura de pantalla: Pulse y suelte simultáneamente el botón de reposo/activación y el botón de inicio . La captura de pantalla se añade al álbum Carrete. Nota: En un iPad sin cámara, las capturas de pantalla se añaden al álbum “Fotos guardadas”. Cómo ver, compartir e imprimir Las fotos y los vídeos que se capturan con Cámara se guardan en el álbum Carrete. Si ha activado Fotos en Streaming en Ajustes > iCloud, las fotos nuevas también aparecerán en el álbum de Fotos en Streaming y se transferirán a sus otros dispositivos iOS y ordenadores. Consulte Cómo usar iCloud en la página 16 y Fotos en streaming en la página 62. Ver el álbum Carrete: Desplácese hacia la derecha o pulse la imagen en miniatura. También puede ver el álbum Carrete en la app Fotos. • Mostrar u ocultar los controles mientras se visualiza una foto o un vídeo: Pulse la pantalla. • Compartir una foto o vídeo: Pulse . Para enviar varias fotos o vídeos, pulse mientras ve las miniaturas, seleccione los ítems y, a continuación, pulse Compartir. • Imprimir una foto: Pulse . Consulte Impresión con AirPrint en la página 34. • Eliminar una foto o un vídeo: Pulse . Volver a la cámara: Pulse OK. Cargar fotos y vídeos en su ordenador: Conecte el iPad al ordenador. • Mac: Seleccione las fotos y vídeos que desea y, a continuación, haga clic en el botón Importar o Descargar de iPhoto o de cualquier aplicación fotográfica compatible instalada en el ordenador. • PC: Siga las instrucciones incluidas con su aplicación fotográfica. Si elimina las fotos o los vídeos del iPad al cargarlas en el ordenador, se eliminarán del álbum Carrete. Puede usar el panel de ajustes Fotos de iTunes para sincronizar fotos y vídeos con la app Fotos del iPad (en el caso de vídeos, solo en un Mac). Consulte Sincronización con iTunes en la página 18.Capítulo 9 Cámara 60 Edición de fotos y recorte de vídeos Mejora Mejora Recortar Recortar Girar Girar Corregir ojos rojos Corregir ojos rojos Editar una foto: Mientras visualiza una foto a pantalla completa, pulse Editar y, a continuación, pulse una herramienta. • Mejora automática: Los retoques mejoran la claridad u oscuridad, saturación de color y otras cualidades en general de una foto. Si desea anular los retoques, pulse de nuevo la herramienta (aunque ya haya guardado los cambios). • Corrección de ojos rojos: Pulse cada ojo que haya que corregir. • Recortar: Arrastre las esquinas de la cuadrícula, arrastre la foto para recolocarla y, por último, pulse Recortar. Para establecer unas determinadas proporciones, pulse Proporción. Cortar un vídeo: Mientras visualiza un vídeo, pulse la pantalla para mostrar los controles. Arrastre uno de los dos extremos del visualizador de fotogramas en la parte superior del vídeo y, a continuación, pulse Cortar. Importante: Si selecciona “Cortar original”, los fotogramas recortados se eliminarán permanentemente del vídeo original. Si selecciona “Guardar como vídeo nuevo”, se guardará un nuevo clip de vídeo recortado en el álbum Carrete y no se modificará el vídeo original.10 61 Cómo visualizar fotos y vídeos Fotos le permite ver las fotos y vídeos del iPad en su: • Álbum Carrete: fotos y vídeos realizados con el iPad o guardados procedentes de un mensaje de correo electrónico, un mensaje de texto, una página web o una captura de pantalla • Álbumes de Fotos en streaming: fotos de Mis Fotos en streaming y secuencias compartidas (consulte Fotos en streaming en la página 62) • Álbum “Última importación”, con fotos y vídeos importados de una cámara digital, un dispositivo iOS o una tarjeta de memoria SD (consulte Cómo importar fotos y vídeos en la página 65) • Fototeca y otros álbumes sincronizados desde su ordenador (consulte Sincronización con iTunes en la página 18) Nota: En un iPad sin cámara, el álbum “Fotos guardadas” sustituye el álbum Carrete. Seleccione una foto para visualizarla. Seleccione una foto para visualizarla. Editar la foto. Editar la foto. Reproducir un pase de diapositivas. Reproducir un pase de diapositivas. Eliminar la foto. Eliminar la foto. Transmitir el pase de diapositivas a un televisor de alta definición (HDVT) mediante AirPlay. Transmitir el pase de diapositivas a un televisor de alta definición (HDVT) mediante AirPlay. Compartir la foto, asignársela a un contacto, utilizarla como fondo de pantalla o imprimirla. Compartir la foto, asignársela a un contacto, utilizarla como fondo de pantalla o imprimirla. Pulse la pantalla para mostrar los controles. Pulse la pantalla para mostrar los controles. Visualizar fotos y vídeos: Pulse uno de los botones de la parte superior de la pantalla. Por ejemplo, pulse Álbum y, a continuación, pulse un álbum para ver sus miniaturas. Pulse la imagen en miniatura de una foto o de un vídeo para verlo a pantalla completa. • Visualizar la foto o el vídeo siguiente o anterior: Desplácese hacia la izquierda o hacia la derecha. • Acercar o alejar la imagen: Pulse dos veces o pellizque. FotosCapítulo 10 Fotos 62 • Desplazar una foto: Arrástrela. • Reproducir un vídeo: Pulse en el centro de la pantalla. También puede juntar y separar dos dedos para abrir o cerrar un álbum, ver una foto o un vídeo a pantalla completa o regresar a la vista en miniatura. Los álbumes que sincronice con iPhoto 8.0 (iLife ’09) o posterior, o con Aperture v3.0.2 o posterior, podrán visualizarse por eventos o por caras. También podrá visualizar las fotos por lugar si se han realizado con una cámara compatible con la función de etiquetado geográfico. Ver un pase de diapositivas: Pulse “Pase de diapositivas”. Seleccione las opciones del pase de diapositivas y, a continuación, pulse “Iniciar pase”. Para detener el pase, pulse la pantalla. Para ajustar otras opciones, vaya a Ajustes > Fotos y cámara. Transmitir un vídeo o un pase de diapositivas en tiempo real a un televisor: Consulte AirPlay en la página 33. Cómo organizar fotos y vídeos Crear un álbum: Pulse Álbumes, pulse , introduzca un nombre y, a continuación, pulse Guardar. Seleccione los ítems que desee añadir al nuevo álbum y, a continuación, pulse OK. Nota: Los álbumes creados en el iPad no se sincronizarán con el ordenador. Añadir ítems a un álbum: Cuando visualice las miniaturas, pulse , seleccione los ítems que desee y, a continuación, pulse OK. Gestionar álbumes: Pulse Editar. • Renombrar un álbum: Pulse el nombre del álbum y, a continuación, introduzca un nombre nuevo. • Reorganizar los álbumes: Arrastre un álbum. • Eliminar un álbum: Pulse . Solo se podrán renombrar o eliminar los álbumes creados con el iPad. Fotos en streaming Con “Fotos en streaming”, una función de iCloud (consulte Cómo usar iCloud en la página 16), las fotos que realice con el iPad aparecerán automáticamente en sus demás dispositivos configurados con “Fotos en streaming”, incluido su Mac o PC. Fotos en streaming también le permite compartir fotos seleccionadas con amigos y familiares, directamente en sus dispositivos o en Internet. Acerca de Fotos en streaming Cuando está activada la función “Fotos en streaming”, las fotos que realiza con el iPad (así como cualquier otra foto añadida al Carrete) se cargan en su secuencia de fotos en streaming después de salir de la app Cámara y de que el iPad se conecte a Internet por Wi-Fi. Dichas fotos aparecerán en el álbum “Mis fotos en streaming” del iPad y en sus otros dispositivos configurados con “Fotos en streaming”. Activar Fotos en streaming: Vaya a Ajustes > iCloud > Fotos en streaming. Las fotos añadidas a su secuencia de fotos en streaming desde sus otros dispositivos de iCloud también aparecerán en “Mis fotos en streaming”. El iPad y los demás dispositivos iOS pueden mostrar hasta mil de sus fotos más recientes en “Mis fotos en streaming”. Sus ordenadores pueden mantener permanentemente todas sus fotos de Fotos en streaming.Capítulo 10 Fotos 63 Nota: Las fotos de “Fotos en streaming” no cuentan de cara al límite de almacenamiento de iCloud. Gestionar el contenido de Fotos en streaming: En el álbum “Fotos en streaming”, pulse Editar. • Guardar fotos en el iPad: Seleccione las fotos y pulse Guardar. • Compartir, imprimir, copiar o guardar fotos en el álbum Carrete: Seleccione las fotos y pulse Compartir. • Eliminar fotos: Seleccione las fotos y pulse Eliminar. Nota: Aunque las fotos eliminadas se borren de “Fotos en streaming” en sus dispositivos, los originales permanecerán en el álbum Carrete del dispositivo donde se originaron. Tampoco se eliminan de las fotos en streaming las fotos guardadas en un dispositivo u ordenador. Para eliminar fotos de “Fotos en streaming”, debe tener instalado iOS 5.1 o posterior en el iPad y en sus otros dispositivos iOS. Consulte support.apple.com/kb/HT4486?viewlocale=es_ES. Fotos en streaming compartidas Las Fotos en streaming compartidas le permiten compartir fotos solo con personas concretas. Los usuarios de iOS 6 y OS X Mountain Lion pueden suscribirse a sus fotos en streaming compartidas, ver las últimas fotos añadidas, marcar fotos con “Me gusta” y dejar comentarios desde sus dispositivos. También podrá crear un sitio web público para una secuencia de fotos en streaming compartidas y compartir sus fotos con otras personas por Internet. Nota: Las secuencias de fotos en streaming compartidas funcionan por Wi-Fi y a través de redes móviles (iPad Wi-Fi + cellular). Pueden aplicarse tarifas de datos de telefonía móvil. Activar las secuencias de fotos en streaming compartidas: Vaya a Ajustes > iCloud > Fotos en streaming. Crear unas fotos en streaming compartidas: Pulse “Fotos en streaming” y, a continuación, pulse . Para invitar a otros usuarios de iOS 6 o OS X Mountain Lion a suscribirse a sus fotos en streaming compartidas, introduzca sus direcciones de correo electrónico. Para publicar las fotos en streaming en icloud.com, active “Sitio web público”. Nombre el álbum y, a continuación, pulse Crear. Añadir fotos a unas fotos en streaming compartidas: Seleccione una foto, pulse , pulse “Fotos en streaming” y, a continuación, seleccione las fotos en streaming compartidas. Para añadir varias fotos a un álbum, pulse Editar, seleccione las fotos y, a continuación, pulse Compartir. Eliminar fotos de unas fotos en streaming compartidas: Pulse las fotos en streaming compartidas, pulse Editar, seleccione las fotos y, a continuación, pulse Eliminar. Editar unas fotos en streaming compartidas: Pulse “Fotos en streaming”, pulse Editar y, después, pulse la secuencia de fotos compartidas en streaming. Puede: • renombrar las fotos en streaming; • añadir o eliminar suscriptores y reenviar una invitación; • crear un sitio web público y compartir el enlace; • eliminar las fotos en streaming.Capítulo 10 Fotos 64 Cómo compartir fotos y vídeos Puede compartir fotos mediante mensajes de correo electrónico, mensajes de texto, secuencias de fotos, tuits y Facebook. Los vídeos pueden compartirse mediante mensajes de correo electró- nico o de texto, o a través de YouTube. Compartir o copiar una foto o un vídeo: Seleccione una foto o un vídeo y, a continuación, pulse . Si no ve , pulse la pantalla para mostrar los controles. El límite de tamaño de los archivos adjuntos viene determinado por su proveedor de servicios. El iPad puede comprimir los archivos de foto o vídeo adjuntos en caso necesario. También puede copiar fotos y vídeos y, a continuación, pegarlos en un mensaje de correo electrónico o de texto. Compartir o copiar varias fotos y vídeos: Mientras visualiza las imágenes en miniatura, pulse Editar, seleccione las fotos o los vídeos y, a continuación, pulse Compartir. Guardar una foto o vídeo procedente de: • Un mensaje de correo electrónico: Pulse para descargarlo si es necesario, pulse la foto o mantenga pulsado el vídeo y, a continuación, pulse Guardar. • Un mensaje de texto: Pulse el ítem en la conversación, pulse , y, a continuación, pulse Guardar. • Una página web (solo fotos): Mantenga pulsada la foto y, a continuación, pulse “Guardar imagen”. Las fotos y vídeos que reciba, o que guarde de una página web, se guardarán en el álbum Carrete (o en “Fotos guardadas”, en un iPad sin cámara). Impresión de fotos Imprimir en impresoras compatibles con AirPrint: • Imprimir una sola foto: Pulse y, a continuación, pulse Imprimir. • Imprimir varias fotos: Mientras visualiza un álbum de fotos, pulse Editar, seleccione las fotos, pulse Compartir y, a continuación, pulse Imprimir. Consulte Impresión con AirPrint en la página 34. Marco de fotos Cuando el iPad está bloqueado, puede utilizarlo para ver un pase de diapositivas de todos sus álbumes de fotos o de los álbumes de fotos que seleccione. Iniciar la modalidad de marco de fotos: Pulse el botón de reposo/activación para bloquear el iPad, vuelva a pulsar el botón para encender la pantalla y, a continuación, pulse . • Poner en pausa el pase de diapositivas: Pulse la pantalla. • Detener el pase de diapositivas: Ponga en pausa el pase de diapositivas y, a continuación, pulse . Seleccionar los álbumes visualizados: Vaya a Ajustes > Marco de fotos. Ajustar otras opciones para la modalidad de marco de fotos: Vaya a Ajustes > Marco de fotos. Desactivar la modalidad de marco de fotos: Vaya a Ajustes > General > Bloqueo con código.Capítulo 10 Fotos 65 Cómo importar fotos y vídeos Con el Kit de conexión de cámara del iPad (de venta por separado), puede importar fotos y vídeos directamente de una cámara digital, otro dispositivo iOS con cámara o una tarjeta de memoria SD. Importar fotos: 1 Inserte el lector de tarjetas SD o el conector para cámara (incluido en el Kit de conexión de cámara del iPad) en el conector Dock del iPad. • Para conectar una cámara o un dispositivo iOS: Utilice el cable USB que venía con la cámara o con el dispositivo iOS y conéctelo al puerto USB del conector para cámara. Si va a utilizar un dispositivo iOS, asegúrese de que esté encendido y desbloqueado. Asimismo, para conectar una cámara, asegúrese de que está encendida y en modo de transferencia. Para obtener más información, consulte la documentación que venía con la cámara. • Para utilizar una tarjeta de memoria SD: Inserte la tarjeta en la ranura del lector de tarjetas SD. Cuando inserte la tarjeta en la ranura, no la fuerce. La tarjeta solo puede insertarse en una única posición. Para obtener más información, consulte la documentación del Kit de conexión de cámara del iPad. 2 Desbloquee el iPad. 3 La app Fotos se abre y muestra las fotos y los vídeos que pueden importarse. 4 Seleccione las fotos y los vídeos que desee importar. • Para importar todos los ítems: Pulse “Importar todo”. • Para importar solamente algunos de los ítems: Pulse los ítems que desee importar (aparecerá una marca de selección en cada uno de ellos), pulse Importar y, a continuación, seleccione “Importar selección”. 5 Tras la importación, conserve o elimine las fotos y los vídeos en la tarjeta, en la cámara o en el dispositivo iOS. 6 Desconecte el lector de tarjetas SD o el conector para la cámara. Para ver las fotos, vaya al álbum “Última importación”. Un evento nuevo contiene todas las fotos que se seleccionaron para la importación. Para transferir las fotos al ordenador, conecte el iPad al ordenador e importe las imágenes con una aplicación de fotografía como iPhoto o Adobe Elements.11 66 Hacer fotos Si tiene un iPad 2 o posterior, es muy fácil hacerse una foto con Photo Booth y darle un toque único aplicando efectos. Al hacer una foto, el iPad emite un sonido de obturador. Puede usar los botones de volumen situados en el lateral del iPad para controlar el volumen de sonido de obturador. Este sonido no se reproducirá si el interruptor lateral está en la posición Silencio. Consulte Botones en la página 9. Nota: En algunas regiones, los efectos de sonido suenan aunque el interruptor lateral esté en la posición Silencio. Hacer una foto: Dirija el iPad y pulse . Seleccionar un efecto: Pulse y, a continuación, pulse el efecto que desee. • Modificar un efecto de distorsión: Arrastre el dedo por la pantalla. • Alterar una distorsión: Pellizque, desplace o gire la imagen. Ver la foto que se acaba de hacer: Pulse la miniatura de la última foto. Para volver a mostrar los controles, pulse la pantalla. Alternar las cámaras frontal y trasera: Pulse en la parte inferior de la pantalla. Photo BoothCapítulo 11 Photo Booth 67 Gestionar fotos Las fotos realizadas con Photo Booth se guardan en el álbum Carrete de la app Fotos del iPad. Eliminar una foto: Seleccione una miniatura y, a continuación, pulse . Eliminar varias fotos: Pulse , pulse una miniatura o varias y, después, pulse Eliminar. Copiar o enviar fotos por correo: Pulse , pulse una miniatura o varias y, después, pulse “Enviar por correo” o Copiar. Ver las fotos del álbum Carrete: En Fotos, pulse un álbum y, a continuación, pulse una miniatura. Para ver la foto anterior o siguiente, desplácese hacia la izquierda o hacia la derecha. Consulte Cómo visualizar fotos y vídeos en la página 61. Cargar fotos en el ordenador: Conecte el iPad al ordenador utilizando el cable de Lightning a USB. • Mac: Seleccione las fotos que desee y haga clic en el botón Importar o Descargar de iPhoto o de cualquier aplicación de fotografía compatible que tenga instalada en el ordenador. • PC: Siga las instrucciones incluidas con su aplicación fotográfica. Si elimina las fotos del iPad al cargarlas en el ordenador, se eliminarán del álbum Carrete. Puede utilizar el panel de ajustes Fotos de iTunes para sincronizar las fotos con la app Fotos del iPad.12 68 Utilice la app Vídeos para ver películas, programas de TV y vídeos musicales. Para ver podcasts de vídeo, instale la app gratuita Podcasts desde la tienda App Store. Consulte Capítulo 24, Podcasts, en la página 99. Para ver vídeos grabados con la cámara del iPad, abra la app Fotos. Obtener vídeos: • Comprar o alquilar vídeos en la tienda iTunes store (no disponible en todas las regiones): Abra la app iTunes en el iPad y pulse Vídeos. Consulte Capítulo 20, La tienda iTunes Store, en la página 89. • Transferir vídeos desde el ordenador: Conecte el iPad y sincronice los vídeos de iTunes en su ordenador. Consulte Sincronización con iTunes en la página 18. • Transmitir vídeos en tiempo real desde su ordenador: En su ordenador, active “Compartir en casa” en iTunes. A continuación, en el iPad, vaya a Ajustes > Vídeos e introduzca el ID de Apple y la contraseña que utilizó para configurar “Compartir en casa” en su ordenador. A continuación, abra Vídeos en el iPad y pulse Compartido al principio de la lista de vídeos. Arrastre para avanzar o retroceder. Arrastre para avanzar o retroceder. Pulse el vídeo para mostrar u ocultar los controles. Pulse el vídeo para mostrar u ocultar los controles. Ver el vídeo en un televisor con Apple TV. Ver el vídeo en un televisor con Apple TV. Arrastre para ajustar el volumen. Arrastre para ajustar el volumen. ADVERTENCIA: Para obtener información importante sobre la prevención de la pérdida de audición, consulte Información importante sobre seguridad en la página 133. VídeosCapítulo 12 Vídeos 69 Visualizar un vídeo: Pulse Películas o “Programas de TV” y, a continuación, pulse el vídeo que desea ver. • Escalar un vídeo a pantalla completa o ajustarlo a la pantalla: Pulse o . O bien pulse dos veces la pantalla para ajustar la escala sin mostrar los controles. • Comenzar desde el principio: Si el vídeo contiene capítulos, arrastre el cursor de reproducción a lo largo de la barra hasta la izquierda. Si no hay capítulos, pulse . • Ir al capítulo anterior o siguiente (si está disponible): Pulse o . También puede pulsar dos veces el botón central o equivalente en unos auriculares compatibles (saltar a siguiente) o tres veces (saltar a anterior). • Retroceder o avanzar rápidamente: Mantenga pulsado o . • Seleccionar otro idioma para el audio (si está disponible): Pulse y después seleccione un idioma en la lista Audio. • Mostrar u ocultar los subtítulos (si están disponibles): Pulse y después seleccione un idioma, o pulse No en la lista Subtítulos. • Mostrar u ocultar los subtítulos para sordos (si están disponibles): Vaya a Ajustes > Vídeos. • Ver el vídeo en un televisor: Consulte Conexión del iPad a un televisor u otro dispositivo en la página 33. Eliminar un vídeo: En la Biblioteca, mantenga pulsado un vídeo hasta que aparezca el botón de eliminación y, luego, pulse . Si desea eliminar varios vídeos, pulse Editar. Importante: Si elimina una película alquilada del iPad, se borrará permanentemente y no será posible transferirla de nuevo al ordenador. Cuando elimina un vídeo (que no sea una película alquilada) del iPad, no lo elimina de la biblioteca de iTunes de su ordenador, así que puede volver a sincronizarlo con el iPad cuando lo desee. Si no quiere volver a sincronizar el vídeo con el iPad, ajuste iTunes para que no lo haga. Consulte Sincronización con iTunes en la página 18.13 70 Visión general Con el iPad es muy fácil cumplir la agenda. Puede ver los calendarios de forma independiente o bien varios calendarios a la vez. Cambiar de visualización. Cambiar de visualización. Arrastre un evento para reprogramarlo. Arrastre un evento para reprogramarlo. Seleccionar una vista. Seleccionar una vista. Vea las invitaciones. Vea las invitaciones. Vaya a otra fecha. Vaya a otra fecha. Ver o editar un evento: Pulse el evento. Puede: • ajustar una alerta primaria y secundaria; • cambiar la fecha, hora o duración del evento; • trasladar un evento a otro calendario; • invitar a otros usuarios a asistir a eventos de calendarios de iCloud, Microsoft Exchange y CalDAV; • eliminar el evento. También puede mover un evento manteniéndolo pulsado y arrastrándolo a una nueva hora o ajustando los puntos de selección. CalendarioCapítulo 13 Calendario 71 Añadir un evento: Pulse , introduzca la información del evento y, a continuación, pulse OK. • Establecer el calendario por omisión de los eventos nuevos: Vaya a Ajustes > Correo, contactos, calendarios > “Calendario por omisión”. • Establecer alertas por omisión para cumpleaños y eventos: Vaya a Ajustes > Correo, contactos, calendarios > Alertas por omisión. Buscar eventos: Pulse Lista y, a continuación, introduzca texto en el campo de búsqueda. Se busca en los títulos, los invitados, las ubicaciones y las notas de los calendarios que esté viendo. También puede buscar eventos de Calendario desde la pantalla de inicio. Consulte Cómo buscar en la página 30. Ajustar el tono de alerta para calendarios: Vaya a Ajustes > Sonidos > Alertas calendario. Importar eventos desde un archivo de calendario: Si recibe un archivo de calendario .ics en Mail, abra el mensaje y pulse el archivo de calendario para importar todos los eventos que contenga. También puede importar un archivo .ics publicado en Internet pulsando un enlace al archivo. Algunos archivos .ics le suscribirán a otro calendario en lugar de añadir eventos al suyo. Consulte Cómo trabajar con varios calendarios en la página 71. Si posee una cuenta iCloud, una cuenta de Microsoft Exchange o una cuenta CalDAV compatible, podrá recibir invitaciones a reuniones de otras personas de su empresa y responder a ellas. Invitar a otras personas a un evento: Pulse un evento, pulse Editar y, a continuación, pulse Invitados para seleccionar a quien desee de Contactos. Responder a una invitación: Pulse una invitación del calendario. O pulse para que se muestre la pantalla del evento y, a continuación, pulse una invitación. Podrá ver información sobre el organizador y otros invitados. Si añade comentarios, algo que podría no estar disponible en todos los tipos de calendarios, el organizador podrá ver sus comentarios pero otros asistentes no. Aceptar un evento sin reservar la hora: Pulse el evento y, a continuación, pulse Disponibilidad y seleccione “libre”. El evento seguirá estando en su calendario pero no aparecerá como ocupado ante las demás personas que le envíen invitaciones. Cómo trabajar con varios calendarios Puede ver los calendarios uno por uno o bien varios calendarios a la vez. Puede suscribirse a calendarios de iCloud, Google, Yahoo! o iCalendar, así como a sus eventos y cumpleaños de Facebook. Activar calendarios de iCloud, Google, Exchange o Yahoo!: Vaya a Ajustes > “Correo, contactos, calendarios”, pulse una cuenta y, a continuación, active Calendario. Añadir una cuenta CalDAV: Vaya a Ajustes > “Correo, contactos, calendarios”, pulse “Añadir cuenta” y, a continuación, pulse Otras. En Calendarios, pulse “Añadir cuenta CalDAV”. Ver eventos de Facebook: Vaya a Ajustes > Facebook y, a continuación, inicie sesión con su cuenta Facebook y active el acceso a Calendario. Seleccionar los calendarios que se mostrarán: Pulse Calendarios y, a continuación, pulse para seleccionar los calendarios que desea ver. Aparecerán los eventos de todos los calendarios seleccionados en una sola vista.Capítulo 13 Calendario 72 Ver el calendario de cumpleaños: Pulse Calendarios y, a continuación, pulse Cumpleaños para incluir cumpleaños de sus Contactos con sus eventos. Si ha configurado una cuenta Facebook, también puede incluir el cumpleaños de sus amigos de Facebook. Puede suscribirse a calendarios que utilicen el formato iCalendar (.ics). Muchos servicios basados en calendarios aceptan la suscripción a calendarios, como iCloud, Yahoo!, Google y la aplicación Calendario de OS X. Los calendarios a los que esté suscrito serán de solo lectura. Puede leer los eventos de los calendarios a los que se ha suscrito en el iPad, pero no puede editarlos ni crear nuevos eventos. Suscribirse a un calendario: Vaya a Ajustes > “Correo, contactos, calendarios” y pulse “Añadir cuenta”. Pulse Otras y, a continuación, pulse “Añadir calendario suscrito”. Introduzca el servidor y el nombre del archivo .ics al que desea suscribirse. También puede suscribirse a un calendario de iCalendar (.ics) publicado en Internet pulsando un enlace a dicho calendario. Compartir calendarios de iCloud Puede compartir un calendario de iCloud con otros usuarios de iCloud. Cuando comparte un calendario, otros pueden verlo. Además, puede permitirles añadir o cambiar eventos. También puede compartir una versión de solo lectura para que cualquiera pueda verla. Crear un calendario de iCloud: Pulse Calendarios, pulse Editar y, a continuación, pulse “Añadir calendario”. Compartir un calendario de iCloud: Pulse Calendarios, pulse Editar y, a continuación, pulse el calendario de iCloud que quiere compartir. Pulse “Añadir persona” y, a continuación, seleccione alguno de sus Contactos. La persona recibirá una invitación de correo electrónico para unirse al calendario, aunque necesitará un ID de Apple y una cuenta iCloud para aceptar la invitación. Desactivar las notificaciones de calendarios compartidos: Vaya a Ajustes > “Correo, contactos, calendarios” y, después, desactive “Alertas para compartir”. Cambiar el acceso de una persona a un calendario compartido: Pulse Calendarios, pulse Editar y, a continuación, pulse una persona con la que compartir. Puede desactivar su capacidad para editar el calendario, reenviar la invitación para unirse al calendario o dejar de compartir con esa persona. Compartir un calendario de solo lectura con cualquiera: Pulse Calendarios, pulse Editar y, a continuación, pulse el calendario de iCloud que quiere compartir. Active “Calendario público” y, a continuación, pulse “Compartir enlace” para copiar o enviar la URL del calendario. Cualquiera puede utilizar la URL para suscribirse a su calendario mediante una app compatible, como Calendario para iOS u OS X. Ajustes de Calendario Hay varios ajustes en Ajustes > “Correo, contactos, calendarios” que afectan a Calendario y a sus cuentas de calendario, entre ellos los siguientes: • sincronización de eventos pasados (los eventos futuros se sincronizan siempre); • reproducción del tono de alerta para nuevas invitaciones a reuniones; • compatibilidad con varias zonas horarias del calendario para mostrar las fechas y las horas utilizando una zona horaria diferente.14 73 Visión general El iPad le permite acceder y editar con facilidad sus listas de contactos de cuentas personales, de empresa y de organización. Visualizar en Mapas. Visualizar en Mapas. Añadir o cambiar información. Añadir o cambiar información. Buscar contactos. Buscar contactos. Configurar su tarjeta “Mis datos”: Vaya a Ajustes > “Correo, Contactos, Calendarios”, pulse “Mis datos” y seleccione la tarjeta de contacto con su nombre e información. Siri y otras apps utilizan la tarjeta “Mis datos”. Utilice los campos de personas relacionadas para definir relaciones que desee que Siri conozca, de modo que pueda decir cosas como “busca a mi hermana”. Buscar contactos: Pulse el campo de búsqueda de la parte superior de la lista de contactos e introduzca su búsqueda. También puede buscar en sus contactos desde la pantalla de inicio. Consulte Cómo buscar en la página 30. Compartir un contacto: Pulse un contacto y, a continuación, pulse “Compartir contacto”. Puede enviar los datos del contacto por correo electrónico o por mensaje. Añadir un contacto: Pulse . No puede añadir contactos a un directorio en el que solo tenga permisos de lectura, como por ejemplo, una lista global de direcciones de Microsoft Exchange. Añadir un contacto a su lista Favoritos: Seleccione un contacto, desplácese hacia abajo y pulse el botón “Añadir a favoritos”. El modo “No molestar” utiliza la lista de Favoritos. Consulte “No molestar” y notificaciones en la página 120. Puede ver y editar su lista Favoritos en la app FaceTime. Eliminar un contacto: Seleccione un contacto y pulse Editar. Desplácese hacia abajo y pulse “Eliminar contacto”. ContactosCapítulo 14 Contactos 74 Editar un contacto: Seleccione un contacto y pulse Editar. Puede: • Añadir un nuevo campo: Pulse y, a continuación, seleccione o introduzca una etiqueta para el campo. • Cambiar la etiqueta de un campo: Pulse la etiqueta y seleccione una distinta. Para añadir un nuevo campo, pulse “Etiqueta personalizada”. • Cambiar el tono de llamada o el tono de mensaje de texto del contacto: Pulse el campo de tono de llamada o tono de SMS y seleccione un nuevo sonido. Para cambiar el tono por omisión de los contactos, vaya a Ajustes > Sonidos. • Asignar una foto al contacto: Pulse “Añadir foto”. Puede hacer una foto con la cámara o usar una foto existente. • Actualizar la información de contacto mediante Twitter: Vaya a Ajustes > Twitter > Actualizar contactos. Se comprueban las direcciones de correo electrónico de sus contactos. En el caso de amigos que siga, se actualizará su tarjeta de contacto con el nombre de usuario y la foto de Twitter. • Actualizar la información de contacto mediante Facebook: Vaya a Ajustes > Facebook > Actualizar contactos. Se comprueban las direcciones de correo electrónico de sus contactos. Por cada coincidencia en su lista de amigos, la tarjeta de contacto se actualiza con el nombre de usuario de Facebook y su foto. • Introducir una pausa en un número de teléfono: Pulse y, a continuación, pulse Pausa o Esperar. Cada pausa dura dos segundos. Cada espera detiene la marcación hasta que se vuelve a pulsar Marcar. Utilícelos para automatizar la marcación de una extensión o código, por ejemplo, cuando utilice Contactos en el iPad. Cómo añadir contactos Puede añadir contactos de las siguientes maneras: • Utilizar sus contactos de iCloud: Vaya a Ajustes > iCloud y, a continuación, active Contactos. • Importar sus amigos de Facebook: Vaya a Ajustes > Facebook y, a continuación, active Contactos en la lista “Permitir a estas apps usar sus cuentas”. Se creará un grupo Facebook en Contactos. • Acceder a una lista global de direcciones de Microsoft Exchange: Vaya a Ajustes > “Correo, Contactos, Calendarios” y, a continuación, pulse su cuenta Exchange y, a continuación, active Contactos. • Configurar una cuenta LDAP o CardDAV para acceder a directorios de empresas o instituciones académicas: Vaya a Ajustes > Correo, contactos, calendarios > Añadir cuenta > Otras. A continuación, pulse “Añadir cuenta LDAP” o “Añadir cuenta CardDAV” e introduzca la información de la cuenta. • Sincronizar los contactos del ordenador, Yahoo! o Google: En iTunes, en su ordenador, active la sincronización de los contactos en el panel Información del dispositivo. Para obtener información, consulte la Ayuda iTunes. • Importar contactos de una tarjeta vCard: Pulse un archivo adjunto .vcf de un correo electrónico, un mensaje o una página web. Buscar en un servidor GAL, CardDAV o LDAP: Pulse Grupos, pulse el directorio en el que desee buscar y, a continuación, introduzca su búsqueda. Guardar la información de contacto de un servidor GAL, LDAP o CardDAV: Busque el contacto que desee añadir y, a continuación, pulse “Añadir contacto”.Capítulo 14 Contactos 75 Mostrar u ocultar un grupo: Pulse Grupos y, a continuación, seleccione los grupos que desea ver. Este botón solo aparece si tiene más de una fuente de contactos. Si tiene contactos de varias fuentes, es posible que haya varias entradas para la misma persona. Para evitar que aparezcan contactos repetidos en la lista “Todos los contactos”, los contactos de distintas fuentes que tienen el mismo nombre se combinan y se visualizan como un solo contacto unificado. Al visualizar un contacto unificado, en la parte superior de la pantalla aparece el título “Info unificada”. Vincular un contacto: Edite un contacto, pulse Editar y, a continuación, pulse y seleccione un contacto. Los contactos vinculados no se fusionan. Si modifica o añade información en un contacto unificado, los cambios se copiarán en cada cuenta de origen en la que dicha información ya exista. Si enlaza contactos con distintos nombres o apellidos, los nombres de las tarjetas individuales no cambiarán, pero solo se mostrará un nombre en la tarjeta unificada. Para seleccionar el nombre que debe aparecer cuando visualice la tarjeta unificada, pulse la tarjeta vinculada con el nombre que prefiera y, a continuación, pulse “Usar este nombre para la tarjeta unif.”. Ver la información de contactos de una cuenta de origen: Pulse una de las cuentas de origen. Desenlazar un contacto: Pulse Editar, pulse y, a continuación, pulse Desenlazar. Ajustes de Contactos Para cambiar los ajustes de Contactos, vaya a Ajustes > Correo, contactos, calendarios. Las opciones disponibles le permiten: • cambiar el criterio de ordenación de los contactos; • mostrar los contactos por el nombre o el apellido; • establecer una cuenta por omisión para los nuevos contactos; • configurar su tarjeta “Mis datos”.15 76 Visión general Enviar la nota por correo electrónico o imprimirla. Enviar la nota por correo electrónico o imprimirla. Eliminar la nota. Eliminar la nota. Pulse una nota para visualizarla. Pulse una nota para visualizarla. Añadir una nota. Añadir una nota. Vea la nota anterior o siguiente. Vea la nota anterior o siguiente. Pulse la nota para editarla. Pulse la nota para editarla. Usar iCloud para mantener sus notas actualizadas en sus dispositivos iOS y ordenadores Mac: • Si utiliza una dirección de correo electrónico de me.com o mac.com para iCloud: Vaya a Ajustes > iCloud y active Notas. • Si utiliza una cuenta de Gmail u otra cuenta IMAP para iCloud: Vaya a Ajustes > “Correo, contactos, calendarios” y, después, active la opción Notas de la cuenta correspondiente. Seleccionar la cuenta por omisión de las notas nuevas: Vaya a Ajustes > Notas. Crear una nota en una cuenta específica: Pulse Cuentas y seleccione la cuenta. Después, pulse para crear la nota. Si no ve el botón Cuentas, pulse primero el botón Notas. Ver solo las notas de una determinada cuenta: Pulse Cuentas y seleccione la cuenta. Si no ve el botón Cuentas, pulse primero Notas. Eliminar una nota mientras se visualiza la lista de notas: Desplácese a la izquierda o a la derecha por la nota dentro de la lista. Buscar notas: Mientras visualiza la lista de notas, desplácese a la parte superior de la lista para ver el campo de búsqueda. Pulse en él y escriba lo que busca. También puede buscar notas desde la pantalla de inicio. Consulte Cómo buscar en la página 30. Imprimir o enviar una nota por correo electrónico: Mientras lee la nota, pulse . Para enviar la nota por correo electrónico, el iPad debe tener configurada una cuenta de correo electrónico. Consulte Configuración del correo y otras cuentas en la página 15. Cambiar el tipo de letra: Vaya a Ajustes > Notas. Notas16 77 Recordatorios le permite controlar las cosas que debe hacer. Marque ítems como completados. Marque ítems como completados. Consulte los ítems con una fecha límite concreta. Consulte los ítems con una fecha límite concreta. Pase de una lista a otra. Pase de una lista a otra. Añada un ítem. Añada un ítem. Ver los detalles de los recordatorios: Pulse un recordatorio. Puede: • cambiarlo o eliminarlo • configurar una fecha límite • establecer una prioridad • añadir notas • trasladarlo a otra lista En algunos modelos de iPad Wi-Fi + cellular, Recordatorios puede avisarle cuando llegue a un lugar o cuando se marche de él. Añadir una alerta de localización: Al introducir un recordatorio, pulse y, a continuación, active “Avisarme en un lugar”. Para utilizar otra ubicación, pulse su ubicación actual. Los lugares de esta lista incluyen las direcciones de su tarjeta de información personal de Contactos, como por ejemplo, las direcciones de casa y del trabajo que haya añadido. Para utilizar otra dirección, pulse “Introducir dirección”. Nota: Los recordatorios basados en la ubicación solo pueden utilizarse en los nuevos modelos de iPad Wi-Fi + cellular. No podrá ajustar ubicaciones para los recordatorios de cuentas Microsoft Exchange y Outlook. RecordatoriosCapítulo 16 Recordatorios 78 Buscar en sus recordatorios: Escriba una palabra o una frase en el campo de búsqueda. Los recordatorios se buscan por nombre. También puede utilizar Siri para buscar o añadir recordatorios. Desactivar las notificaciones de los recordatorios: Vaya a Ajustes > Notificaciones. Para obtener información, consulte “No molestar” y notificaciones en la página 120. Ajustar el tono de las notificaciones: Vaya a Ajustes > Sonidos. Mantener los recordatorios actualizados en otros dispositivos: Vaya a Ajustes > iCloud y, a continuación, active Recordatorios. Para actualizar los Recordatorios en OS X Mountain Lion, active iCloud también en su Mac. Otros tipos de cuentas, como Exchange, también admiten Recordatorios. Vaya a Ajustes > “Correo, contactos, calendarios” y, a continuación, active la opción Recordatorios en las cuentas que desee utilizar. Establecer una lista por omisión para los nuevos recordatorios: Vaya a Ajustes > “Correo, contactos, calendarios” y, a continuación, bajo Recordatorios, pulse “Lista por omisión”.17 79 Puede añadir relojes para ver la hora de otras grandes ciudades y zonas horarias de todo el mundo. Añada un reloj. Añada un reloj. Vea relojes, ajuste una alarma, cronometre un evento o ajuste un temporizador. Vea relojes, ajuste una alarma, cronometre un evento o ajuste un temporizador. Elimine relojes o cambie su orden. Elimine relojes o cambie su orden. Añadir un reloj: Pulse Añadir y, a continuación, escriba el nombre de una ciudad o seleccione una de la lista. Si no encuentra la ciudad que busca, pruebe con una ciudad mayor que esté en la misma zona horaria. Mostrar un reloj a pantalla completa: Pulse un reloj y se mostrará a pantalla completa. Pulse Reloj mundial para ver todos sus relojes. Organizar los relojes: Pulse Editar y arrastre para moverlos o pulse para eliminarlos. Ajustar una alarma: Pulse Alarma y, a continuación, pulse . Cambiar una alarma: Pulse Editar y pulse para cambiar los ajustes o pulse para eliminarla. Ajustar un temporizador de reposo: Pulse Temporizador, seleccione una hora, pulse Sonidos, seleccione “Detener reproducción”, pulse Guardar y, después, pulse Iniciar. Reloj18 80 Cómo buscar ubicaciones ADVERTENCIA: Para obtener información importante sobre la navegación segura y el modo de evitar distracciones al conducir, consulte Información importante sobre seguridad en la página 133. Obtenga más información. Obtenga más información. Pulse un marcador para mostrar la tira de información. Pulse un marcador para mostrar la tira de información. Imprima, muestre la situación del tráfico, vea la lista de resultados o seleccione la visualización. Imprima, muestre la situación del tráfico, vea la lista de resultados o seleccione la visualización. Obtenga indicaciones. Obtenga indicaciones. Introduzca una búsqueda. Introduzca una búsqueda. Mostrar su ubicación actual. Mostrar su ubicación actual. Indicaciones de conducción rápidas Indicaciones de conducción rápidas Pulse dos veces para acercar la imagen; pulse con dos dedos para alejar la imagen. O bien junte y separe los dedos sobre la pantalla. Pulse dos veces para acercar la imagen; pulse con dos dedos para alejar la imagen. O bien junte y separe los dedos sobre la pantalla. Ubicación actual Ubicación actual Flyover (3D en la visualización estándar) Flyover (3D en la visualización estándar) Importante: La app Mapas, las indicaciones, 3D, Flyover y las apps basadas en información de localización geográfica dependen de servicios de datos. Estos servicios de datos están sujetos a cambios y pueden no estar disponibles en todas las zonas, lo que puede dar como resultado mapas, indicaciones, 3D, Flyover o datos de localización no disponibles, imprecisos o incompletos. Compare la información proporcionada por el iPad con sus alrededores, y emplee las señales a la vista para resolver cualquier discrepancia. Para poder utilizar algunas funciones de Mapas, es necesario tener activada la función de Localización. Consulte Privacidad en la página 127. MapasCapítulo 18 Mapas 81 Buscar una ubicación: Pulse el campo de búsqueda y, a continuación, teclee una dirección o bien otra información, como por ejemplo: • Intersección (“octava y mercado”) • Área (“greenwich village”) • Punto de referencia (“guggenheim”) • Código postal • Negocio (“cines”, “restaurantes madrid”, “apple españa”) O pulse una de las sugerencias de la lista bajo el campo de búsqueda. Navegar por mapas: • Moverse hacia arriba, hacia abajo, hacia la izquierda o hacia la derecha: Arrastre la pantalla. • Girar el mapa: Gire con dos dedos en la pantalla. Aparecerá una brújula en la esquina superior derecha para mostrar la orientación del mapa. • Volver a la orientación norte: Pulse . Buscar la ubicación de un contacto o de una búsqueda reciente o marcada como favorita: Pulse . Obtener y compartir información sobre una ubicación: Pulse el marcador para mostrar la tira de información y, a continuación, pulse . Cuando está disponible, puede obtener reseñas y fotos de Yelp. También podrá obtener indicaciones, ponerse en contacto con la empresa, visitar la página web, añadir la empresa a sus contactos, compartir la ubicación o bien agregarla a los favoritos. • Leer reseñas: Pulse Reseñas: Para utilizar otras funciones de Yelp, pulse los botones bajo las reseñas. • Ver fotos: Pulse Fotos. • Enviar una ubicación mediante correo electrónico, mensaje de texto, tuit o publicación en Facebook: Pulse “Compartir ubicación”. Para tuitear o publicar en Facebook, debe haber iniciado sesión en sus cuentas. Consulte Compartir en la página 32. Usar un marcador para señalar una posición: Mantenga pulsado el mapa hasta que aparezca el marcador. Seleccione la vista estándar, híbrida o de satélite. Pulse en la esquina inferior derecha. Informar de un problema: Pulse en la esquina inferior derecha. Obtención de indicaciones Obtener indicaciones de conducción: Pulse , pulse , introduzca las ubicaciones inicial y final y, a continuación, pulse Ruta. O bien seleccione un ubicación o ruta de la lista, de estar disponibles. Si aparecen varias rutas, pulse la que desee utilizar. • Escuchar indicaciones paso a paso (iPad Wi-Fi + cellular): Pulse Inicio. La app Mapas sigue su progresión y le ofrece indicaciones paso a paso hasta llegar a su destino. Para mostrar u ocultar los controles, pulse la pantalla. Si el iPad se bloquea automáticamente, la app Mapas se mantiene en pantalla y sigue dándole instrucciones. También puede abrir otra app y seguir obteniendo las indicaciones paso a paso. Para regresar a Mapas, pulse la tira de la parte superior de la pantalla. • Escuchar indicaciones paso a paso (iPad solo Wi-Fi): Pulse Inicio y, a continuación, desplácese a la izquierda para ver la siguiente indicación.Capítulo 18 Mapas 82 • Volver a la visión general de la ruta: Pulse “Visión general”. • Ver las indicaciones en forma de lista: Pulse en la pantalla Visión general. • Detener indicaciones paso a paso: Pulse Final. Obtener indicaciones de conducción rápidas desde la ubicación actual: Pulse en la tira de su destino y, a continuación, pulse “Obtener indicaciones hasta aquí”. Obtener indicaciones a pie: Pulse , pulse , introduzca las ubicaciones inicial y final y, a continuación, pulse Iniciar. O bien seleccione un ubicación o ruta de la lista, de estar disponibles. Pulse Inicio y, a continuación, desplácese a la izquierda para ver la siguiente indicación. Obtener direcciones de transporte público: Pulse , introduzca las ubicaciones inicial y final, pulse y, a continuación, pulse Iniciar. O bien seleccione un ubicación o ruta de la lista, de estar disponibles. Descargue y abra las apps de ruta de los servicios de transporte que desee utilizar. Mostrar la situación del tráfico: Pulse en la esquina inferior derecha de la pantalla y, a continuación, pulse “Mostrar tráfico”. Los puntos naranjas indican tráfico lento, mientras que los puntos rojos señalan atascos. Para ver un informe de incidentes, pulse un marcador. 3D y Flyover En el iPad de tercera generación o posterior, use 3D (vista estándar) o Flyover (vista híbrida o por satélite) para ver vistas tridimensionales de muchas ciudades del mundo. Puede navegar del modo habitual y acercar o alejar la vista para ver edificios. También puede ajustar el ángulo de cámara. Transamerica Pyramid Building es una marca de servicio registrada de Transamerica Corporation. Transamerica Pyramid Building es una marca de servicio registrada de Transamerica Corporation. Usar 3D o Flyover: Acerque la imagen hasta que o se activen y, a continuación, pulse el botón. O bien arrastre hacia arriba con dos dedos. Puede cambiar entre 3D y Flyover pulsando en la esquina inferior derecha de la pantalla y cambiando de vista. Ajustar el ángulo de cámara: Arrastre hacia arriba o hacia abajo con dos dedos. Ajustes de Mapas Ajustar opciones para Mapas: Vaya a Ajustes > Mapas. Entre los ajustes se incluyen: • Volumen de voz de la navegación (iPad Wi-Fi + cellular) • Distancias en millas o kilómetros • Idioma y tamaño de las etiquetas19 83 Obtención de música Obtenga música y otros contenidos de audio en el iPad: • Comprar y descargar música de la tienda iTunes Store: En Música, pulse Store. Consulte Capítulo 20, La tienda iTunes Store, en la página 89. • Descargar automáticamente música comprada en otros dispositivos iOS y ordenadores: Consulte Cómo usar iCloud en la página 16. • Sincronizar contenidos con la aplicación iTunes de su ordenador: Consulte Sincronización con iTunes en la página 18. • Utilizar iTunes Match para guardar su biblioteca musical en iCloud: Consulte iTunes Match en la página 87. Reproducción de música ADVERTENCIA: Para obtener información importante sobre la prevención de la pérdida de audición, consulte Información importante sobre seguridad en la página 133. Puede escuchar audio a través del altavoz integrado, unos auriculares conectados a la toma de auriculares o unos auriculares estéreo Bluetooth inalámbricos enlazados al iPad. Cuando se conecten o enlacen unos auriculares, no saldrá ningún sonido por el altavoz. Reproducir una pista: Busque la pista por lista de reproducción, canción, artista u otra categoría y púlsela. Los controles de reproducción aparecen en la parte superior de la pantalla. • Ver más botones de navegación: Pulse Más. • Ir a cualquier punto de una canción: Arrastre el cursor de reproducción a lo largo de la barra de desplazamiento. Deslice el dedo hacia abajo para ralentizar la velocidad de desplazamiento. Ver la pantalla “Ahora suena”: Pulse la miniatura de la portada del álbum en la parte superior de la pantalla. • Mostrar los controles: Pulse la pantalla. • Explorar las canciones utilizando la ilustración de la portada: Desplácese hacia la izquierda o hacia la derecha. Las canciones comenzarán a reproducirse automáticamente. MúsicaCapítulo 19 Música 84 • Consultar todas las pistas del álbum que contiene la canción actual: Pulse . Pulse una pista para reproducirla. Para volver a la pantalla “Ahora suena”, pulse de nuevo. • Asignar puntuaciones a canciones: En la vista de lista de pistas, pulse la hilera de puntos que aparece sobre la lista para asignar el número de estrellas. Puede utilizar las puntuaciones para crear listas de reproducción inteligentes en iTunes. Arrastre para avanzar o retroceder. Arrastre para avanzar o retroceder. Ajuste el volumen. Ajuste el volumen. Atrás Atrás Buscar música. Buscar música. Lista de pistas Lista de pistas Cambie entre la pantalla de reproducción y la de búsqueda. Cambie entre la pantalla de reproducción y la de búsqueda. Crear una lista de reproducción Genius. Crear una lista de reproducción Genius. Reproducción/Pausa Reproducción/Pausa Repetir Repetir Aleatorio Aleatorio AirPlay AirPlay Buscar música (títulos, artistas, álbumes y compositores): Si se encuentra explorando contenidos, introduzca texto en el campo de búsqueda de la esquina inferior derecha de la pantalla. También puede buscar contenido de audio desde la pantalla de inicio. Consulte Cómo buscar en la página 30. Mostrar los controles de audio mientras está en otra app: Haga doble clic en el botón de inicio y, después, desplácese hacia la derecha en la parte inferior de la pantalla. La app de audio actual (pulse para abrirla). La app de audio actual (pulse para abrirla). Mostrar los controles de audio mientras la pantalla está bloqueada: Haga doble clic en el botón de inicio . Reproducir música en unos altavoces AirPlay o en un Apple TV: Pulse . Consulte AirPlay en la página 33.Capítulo 19 Música 85 Podcasts y audiolibros Al iniciar la reproducción, en la pantalla “Ahora suena” aparecen los controles de podcasts y audiolibros. Nota: La app Podcasts está disponible de forma gratuita en la App Store. Consulte Capítulo 24, Podcasts, en la página 99. Si instala la app Podcasts, los contenidos y controles de podcast se eliminarán de Música. Ajustar la velocidad de reproducción del podcast: Pulse . Vuelva a pulsar para cambiar la velocidad. • = Reproducir al doble de velocidad. • = Reproducir a la mitad de velocidad. • = Reproducir a velocidad normal. Repetir los últimos 15 segundos del podcast: Pulse . Obtener más episodios de un podcast: Pulse Podcasts (o pulse Más primero, si Podcasts no es visible) y, a continuación, pulse un podcast para ver los episodios disponibles. Listas de reproducción Crear una lista de reproducción: Pulse Listas y, a continuación, pulse Nuevo, junto a la parte superior de la pantalla. Después, escriba un nombre y guárdelo. Seleccione las canciones y los vídeos que desee incluir y, después, pulse OK. Editar una lista de reproducción: Vaya a Listas, seleccione la lista y, a continuación, pulse Editar. • Añadir más canciones: Pulse “Añadir canciones”. • Eliminar una canción: Pulse . Borrar una canción de la lista de reproducción no la elimina del iPad. • Cambiar el orden de las canciones: Arrastre . Las listas de reproducción nuevas y modificadas se copiarán en su biblioteca de iTunes la próxima vez que sincronice el iPad con su ordenador, o bien a través de iCloud si está suscrito a iTunes Match. Eliminar una lista de reproducción: En Listas, mantenga pulsada la lista de reproducción y, a continuación, pulse . Eliminar una canción del iPad: En Canciones, deslice el dedo sobre la canción y, a continuación, pulse Eliminar. La canción se eliminará del iPad, pero no de su biblioteca de iTunes en el Mac o el PC, ni de iCloud. Cuando iTunes Match está activado, no puede eliminar música. Si necesita espacio, iTunes Match elimina música por usted, comenzando por las canciones más antiguas y menos reproducidas. Genius Una lista Genius es una colección de canciones de su biblioteca que combinan bien entre ellas. Genius es un servicio gratuito, pero requiere disponer de un ID de Apple. Una mezcla Genius es una selección de canciones del mismo estilo musical, que vuelve a crearse a partir de su biblioteca cada vez que la escucha.Capítulo 19 Música 86 Usar Genius en el iPad: Active Genius en iTunes en su ordenador y, a continuación, sincronice el iPad con iTunes. Las mezclas Genius se sincronizan automáticamente, a menos que se gestione la música manualmente. También puede sincronizar las listas Genius. Reproducir una mezcla Genius: Pulse Listas y, a continuación, pulse una de las mezclas Genius de la parte superior de las listas de reproducción. Crear una lista de reproducción Genius: Reproduzca una canción y, a continuación, pulse en la parte superior de la pantalla. La lista de reproducción Genius se añade a sus listas de reproducción, a continuación de las mezclas Genius. Reproducir una lista de reproducción Genius: Pulse la lista de reproducción. • Actualizar la lista de reproducción: Pulse Actualizar. • Guardar la lista de reproducción: Pulse Guardar. La lista de reproducción se guardará con el título de la canción elegida y se marcará con . Reemplazar la lista Genius utilizando otra canción: Reproduzca una canción y, a continuación, pulse . Editar una lista Genius guardada: Pulse la lista y, a continuación, pulse Editar. • Eliminar una canción: Pulse . • Cambiar el orden de las canciones: Arrastre . Eliminar una lista Genius guardada: Mantenga pulsada la lista y, a continuación, pulse . Las listas de reproducción Genius creadas en el iPad se copiarán en su ordenador al sincronizarlo con iTunes. Nota: Cuando una lista de reproducción Genius se sincronice con iTunes, no podrá borrarla directamente del iPad. Utilice iTunes para editar el nombre de la lista de reproducción, detener su sincronización o eliminarla. Siri Puede usar Siri (iPad de tercera generación o posterior) para controlar la reproducción de música. Consulte Capítulo 4, Siri, en la página 39. Utilizar Siri para reproducir música: Mantenga pulsado el botón de inicio . • Reproducir o poner en pausa la música: Diga “reproducir” o “reproducir música”. Para hacer una pausa, diga “pausa,” “detener música” o bien “detener”. También puede decir “canción anterior” o “canción anterior”. • Reproducir un álbum, artista o lista de reproducción: Diga “reproducir” y, a continuación, “álbum” “artista” o “lista” y el nombre. • Reordenar aleatoriamente la lista de reproducción actual: Diga “aleatorio”. • Obtener más información sobre la canción actual: Diga “qué suena”, “quién canta esta canción” o “de quién es esta canción”. • Usar Genius para reproducir canciones similares: Diga “Genius” o “reproducir más canciones como esta”.Capítulo 19 Música 87 iTunes Match iTunes Match almacena su biblioteca musical en iCloud (incluidas las canciones importadas de discos CD) y le permite disfrutar de su colección en el iPad y en otros dispositivos iOS y ordenadores. iTunes Match estará disponible mediante el pago de una suscripción. Nota: iTunes Match no está disponible en todas las áreas. Pueden aplicarse tarifas de datos de telefonía móvil si está activada la opción Ajustes > Música > “Usar datos móviles”. Suscribirse a iTunes Match: En iTunes en su ordenador, vaya a Store > “Activar iTunes Match” y, a continuación, haga clic en el botón Suscribirse. Una vez suscrito, iTunes añadirá su música, listas de reproducción y mezclas Genius a iCloud. Las canciones que coincidan con la música que ya se encuentre en la tienda iTunes Store pasarán a estar automáticamente disponibles en iCloud. Las demás canciones se cargan. Puede descargar y reproducir las canciones coincidentes hasta calidad iTunes Plus (AAC a 256 kbps sin DRM), aunque la calidad del original fuese inferior. Para obtener más información al respecto, consulte www.apple.com/es/icloud/features. Activar iTunes Match: Vaya a Ajustes > Música. La activación de iTunes Match elimina la música sincronizada del iPad y desactiva las mezclas Genius y las listas de reproducción Genius. Nota: Si está activado “Usar datos móviles”, pueden aplicarse tarifas por datos móviles. Las canciones se descargan en el iPad cuando las reproduce. También puede descargar canciones manualmente. Descargar un álbum en el iPad: Mientras navega, pulse Álbumes, pulse un álbum y, a continuación, pulse . Mostrar solo música que se ha descargado desde iCloud: Vaya a Ajustes > Música y, a continuación, desactive “Mostrar toda la música” (solo disponible cuando iTunes Match está activado). Gestionar sus dispositivos utilizando iTunes Match o Descargas automáticas: En iTunes en su ordenador, vaya a Store > Ver mi cuenta. Inicie sesión y, a continuación, haga clic en “Gestionar dispositivos”, en la sección “iTunes en la nube”. la función “Compartir en casa” La función “Compartir en casa” le permite reproducir música, películas y programas de televisión en el iPad desde la biblioteca de iTunes de su Mac o PC. El iPad y el ordenador deben estar conectados a la misma red Wi-Fi. Nota: Esta función requiere iTunes 10.2 o posterior, disponible en www.itunes.com/es/download. No es posible compartir contenidos extra, como folletos digitales y iTunes Extras. Reproducir música desde la biblioteca de iTunes de su ordenador en el iPad: 1 En iTunes, en su ordenador, vaya a Avanzado > Activar Compartir en casa. Inicie sesión y, a continuación, haga clic en “Crear Compartir en casa”. 2 En el iPad, vaya a Ajustes > Música y, a continuación, inicie sesión en “Compartir en casa” con el mismo ID de Apple y la misma contraseña. 3 En Música, pulse Más y, a continuación, pulse Compartido y seleccione la biblioteca de su ordenador. Regresar al contenido del iPad: Pulse Compartido y seleccione “Mi iPad”.Capítulo 19 Música 88 Ajustes de Música Vaya a Ajustes > Música para ajustar las opciones de Música, tales como: • ajuste de volumen (para normalizar el nivel de volumen del contenido de audio) • Ecualizador (EQ) Nota: EQ afecta a todas las salidas de sonido, incluidos el conector de auriculares y AirPlay. Los ajustes de EQ suelen aplicarse únicamente a música reproducida desde la app Música. El ajuste Nocturno, en cambio, se aplica a todas las salidas de audio, tanto vídeo como música. Nocturno comprime el rango dinámico de la salida de audio, reduciendo el volumen de los pasajes más fuertes y aumentando el volumen de los más tranquilos. Podría utilizar este ajuste para escuchar música en un avión o en otro entorno ruidoso, por ejemplo. • agrupación de las canciones por artista del álbum • iTunes Match • la función “Compartir en casa” Ajustar el límite de volumen: Vaya a Ajustes > Música > “Límite de volumen” y, a continuación, ajuste el regulador de volumen. Restringir cambios al límite de volumen: Vaya a Ajustes > General > Restricciones > “Límite de volumen” y, a continuación, pulse “No permitir cambios”.20 89 Utilice iTunes Store para añadir música, programas de televisión y podcasts al iPad. Explorar Explorar Vuelva a descargar los productos comprados. Vuelva a descargar los productos comprados. Cambie categorías. Cambie categorías. Utilice la tienda iTunes Store para: • buscar música, programas de televisión, películas, tonos y muchas otras cosas navegando o buscándolas directamente; • descargar compras anteriores; Nota: Necesita una conexión a Internet y un ID de Apple para utilizar la tienda iTunes Store. Explorar contenido: Pulse una de las categorías. Pulse Géneros para refinar los listados. Para ver más información sobre un ítem, púlselo. Buscar contenidos: Pulse Buscar y, a continuación, pulse el campo de búsqueda, introduzca una o más palabras y pulse Buscar. Ver o escuchar un fragmento de un ítem: Pulse una canción o un vídeo para reproducir una muestra. La tienda iTunes StoreCapítulo 20 La tienda iTunes Store 90 Comprar un ítem: Pulse el precio del ítem (o pulse Gratis) y, a continuación, pulse otra vez para comprarlo. Si ya ha comprado el ítem, aparecerá “Descargar” en lugar del precio y no se le volverá a cobrar. Mientras se descargan ítems, pulse Más y, a continuación, pulse Descargas para ver el progreso de las descargas. Alquilar una película: En algunas zonas, hay determinadas películas disponibles para alquilar. Tiene 30 días para comenzar a ver una película alquilada. Cuando haya comenzado a reproducirla, podrá verla tantas veces como desee en un plazo de 24 horas. Una vez transcurridos estos plazos, la película se eliminará automáticamente. Descargar una compra anterior: Pulse Comprado. Para descargar automáticamente las compras realizadas en otros dispositivos, vaya a Ajustes > iTunes Store y App Store. Canjear una tarjeta o código de regalo: Pulse cualquier categoría (como música), desplácese hasta el final y, a continuación, pulse Canjear. Ver o editar su cuenta: Vaya a Ajustes > “iTunes Store y App Store”, pulse su ID de Apple y, a continuación, pulse “Ver ID de Apple”. Pulse un ítem para editarlo. Para cambiar la contraseña, pulse el campo “ID de Apple”. Activar o desactivar iTunes Match: Vaya a Ajustes > iTunes Store y App Store. iTunes Match es un servicio de suscripción que almacena toda su música en iCloud para que pueda acceder a ella desde cualquier lugar en el que se encuentre. Iniciar sesión con otro ID de Apple: Vaya a Ajustes > “iTunes Store y App Store”, pulse su nombre de cuenta y, a continuación, pulse Desconectarse. La próxima vez que descargue una app, podrá introducir un ID de Apple diferente. Descargar compras utilizando la red de telefonía móvil (modelos Wi-Fi + cellular): Vaya a Ajustes > iTunes Store y App Store > Usar datos móviles. Esta opción también activa la reproducción de canciones desde iTunes Match. Descargar compras y utilizar iTunes Match a través de la red de telefonía móvil puede suponer la aplicación de tarifas por parte de su operador.21 91 Visión general Utilice la tienda App Store para añadir apps al iPad. Busque, compre y descargue apps diseñadas específicamente para el iPad o apps para el iPhone y el iPod touch. Explorar Explorar Vuelva a descargar los productos comprados. Vuelva a descargar los productos comprados. Utilice la tienda App Store para: • buscar apps nuevas gratuitas o de pago navegando o buscándolas directamente, • descargar actualizaciones y compras anteriores, • canjear una tarjeta de regalo o un código de descarga, • recomendar una app a un amigo, • gestionar su cuenta de App Store. Nota: Necesita una conexión a Internet y un ID de Apple para utilizar la tienda App Store. Comprar una app: Pulse el precio de la app (o pulse Gratis) y, a continuación, pulse Comprar. Si ya ha adquirido la app, en lugar del precio aparecerá “Instalar”. No se le cobrará nada por volver a descargarla. Durante la descarga de una app, su icono aparece en la pantalla de inicio con un indicador de estado. La tienda App StoreCapítulo 21 La tienda App Store 92 Descargar una compra anterior: Pulse Actualizar y, a continuación, pulse Comprado. Para descargar automáticamente las nuevas compras realizadas en otros dispositivos, vaya a Ajustes > iTunes Store y App Store. Descargar apps actualizadas: Pulse Actualizar. Pulse una app para leer información sobre la nueva versión y pulse Actualizar para descargarla. O pulse “Actualizar todas” para descargar todas las apps de la lista. Canjear una tarjeta de regalo o un código de descarga: Pulse Destacados, desplácese hasta el final y pulse Canjear. Pasar la voz sobre una app: Busque la app y, a continuación, pulse y seleccione cómo desea compartirla. Ver y editar su cuenta: Vaya a Ajustes > “iTunes Store y App Store”, pulse su ID de Apple y, a continuación, pulse “Ver ID de Apple”. Puede suscribirse a boletines de iTunes y ver la política de privacidad de Apple. Para cambiar la contraseña, pulse el campo “ID de Apple”. Iniciar sesión con otro ID de Apple: Vaya a Ajustes > “iTunes Store y App Store”, pulse su nombre de cuenta y, a continuación, pulse Desconectarse. La próxima vez que descargue una app, podrá introducir un ID de Apple diferente. Crear un nuevo ID de Apple: Vaya a Ajustes > iTunes Store y App Store. A continuación, pulse “Crear nuevo ID de Apple” y siga las instrucciones que aparecen en pantalla. Descargar compras utilizando la red de telefonía móvil (modelos Wi-Fi + cellular): Vaya a Ajustes > iTunes Store y App Store > Usar datos móviles. Descargar compras a través de la red de telefonía móvil puede suponer la aplicación de tarifas por parte de su operador. Las apps de Quiosco solo se actualizan por Wi-Fi. Eliminación de apps Eliminar una app de App Store: Mantenga pulsado su icono en la pantalla de inicio hasta que el icono empiece a moverse y, a continuación, pulse . No podrá eliminar las apps integradas. Cuando termine, pulse el botón de inicio . Al eliminar una app, se eliminarán también todos los datos que contiene. Puede volver a descargar gratuitamente cualquier app que haya adquirido en la tienda App Store. Para obtener información sobre la eliminación de todas sus apps, datos y ajustes, consulte Restablecer en la página 125.22 93 Quiosco organiza sus apps de revistas y periódicos y le informa cuando hay nuevos números listos para su lectura. Busque apps del Quiosco. Busque apps del Quiosco. Mantenga pulsada una publicación para reorganizarla. Mantenga pulsada una publicación para reorganizarla. Quiosco organiza apps de periódicos y revistas en una estantería para proporcionar un fácil acceso a las mismas. Buscar apps de Quiosco: Pulse Quiosco para mostrar la estantería y, a continuación, pulse Store. Cuando adquiera una app de quiosco, se añadirá automáticamente a su estantería. Una vez descargada la app, ábrala para ver sus números y opciones de suscripción. Las suscripciones son compras integradas, que se facturan a su cuenta de ID de Apple. Desactivar la descarga automática de nuevos números: Vaya a Ajustes > Quiosco. Si una app es compatible, Quiosco descargará automáticamente nuevos números cuando esté conectado a una red Wi-Fi. Quiosco23 94 Visión general iBooks es una forma extraordinaria de leer y comprar libros. Descargue la app gratuita iBooks de la tienda App Store y disfrute todo tipo de libros, desde los grandes clásicos hasta las obras más vendidas. Añadir un marcador. Añadir un marcador. Pulse dos veces para activar el zoom. Pulse dos veces para activar el zoom. Ir a otra página. Ir a otra página. iBooks es una forma extraordinaria de disfrutar de libros y archivos PDF. Descargue la app gratuita iBooks de la tienda App Store y acceda a todo tipo de libros, desde los grandes clásicos hasta las obras más vendidas, en la tienda iBookstore integrada. Para descargar la app iBooks y utilizar la iBookstore, necesita una conexión a Internet y un ID de Apple. Visitar la tienda iBookstore: En iBooks, pulse Tienda para: • buscar libros navegando o bien realizando búsquedas específicas; • conseguir una muestra de un libro para ver si le gusta; • leer y escribir opiniones y ver los más vendidos actualmente; • hablarle a un amigo de un libro por correo electrónico. Comprar un libro: Busque uno que quiera, pulse el precio y vuelva a pulsarlo para obtenerlo. iBooksCapítulo 23 iBooks 95 Obtener información sobre un libro: Puede leer un resumen del libro, consultar reseñas y leer una muestra del libro antes de comprarlo. Después de comprar un libro, puede escribir su propia reseña. Descargar una compra anterior: Pulse Comprado. Para descargar una compra mientras navega, pulse Descargar donde normalmente se ve el precio. No se le volverá a cobrar. Para descargar automáticamente los ítems adquiridos en otros dispositivos, vaya a Ajustes > iTunes Store y App Store. Lectura de libros Leer un libro es fácil. Vaya a la estantería y pulse el libro que desee leer. Cada libro presenta una serie de características específicas, basadas en su contenido y formato. Es posible que algunas de las funciones que se describen a continuación no estén disponibles en el libro que está leyendo. Abrir un libro: Pulse el libro que desee leer. Si no lo ve en la estantería, desplácese a la izquierda o a la derecha para ver otras colecciones. • Mostrar los controles: Pulse cerca del centro de la página. • Ampliar una imagen: Pulse dos veces en la imagen. En algunos libros, mantenga pulsado para mostrar una lupa que puede utilizar para ver una imagen. • Ir a una determinada página: Utilice los controles de navegación de páginas de la parte inferior de la pantalla. O bien pulse , introduzca un número de página y, a continuación, pulse el número de página en los resultados de la búsqueda. • Buscar la definición de una palabra: Pulse dos veces una palabra, utilice los puntos de selección para ajustar el fragmento seleccionado y, a continuación, pulse Definir en el menú que aparece. No hay definiciones disponibles para todos los idiomas. • Ver el índice: Pulse . Con algunos libros, también puede realizar un movimiento de pellizco para ver el índice. • Añadir o eliminar un marcador: Pulse . Vuelva a pulsar para eliminar el marcador. No es necesario que añada un marcador de página al cerrar el libro, ya que iBooks recuerda dónde dejó la lectura. Puede tener varios marcadores (para verlos todos, pulse y, a continuación, pulse Marcadores). Añadir notas a un libro: Puede añadir notas a un libro y también resaltar partes del mismo. • Añadir un fragmento: pulse dos veces una palabra, utilice los puntos de selección para ajustar el fragmento seleccionado, pulse Resaltar y seleccione un color o subrayado. • Eliminar un fragmento: Pulse el texto resaltado y, a continuación, pulse . • Añadir una nota: Pulse dos veces una palabra, pulse Resaltar y, a continuación, seleccione en el menú que aparece. • Eliminar una nota: Elimine su texto. Para eliminar la nota y su resaltado, pulse el texto resaltado y, a continuación, pulse . • Ver todas las notas: Pulse y, a continuación, pulse Notas. Pulse para imprimir o enviar por correo electrónico sus notas. Cambiar el aspecto de un libro: Algunos libros le permiten cambiar el tamaño de la letra, el tipo y el color de página. • Cambiar el tipo o el tamaño de la letra: Pulse cerca del centro de una página para mostrar los controles y, a continuación, pulse . Pulse “Tipos de letra” para seleccionar un tipo. Algunos libros solo le permiten cambiar el tamaño de la letra cuando el iPad está en orientación vertical. Capítulo 23 iBooks 96 • Cambiar el color de la página y del texto: Pulse cerca del centro de la página para mostrar los controles, pulse y, a continuación, pulse Tema. Este ajuste se aplica a todos los libros que lo admiten. • Cambiar el brillo: Pulse cerca del centro de una página para mostrar los controles y, a continuación, pulse . Si no ve , pulse primero. • Activar o desactivar la justificación y la división de palabras al final de línea: Vaya a Ajustes > iBooks. Los archivos PDF y algunos libros no se pueden justificar ni aplicar división de palabras al final de línea. Interacción con objetos multimedia Algunos libros presentan elementos interactivos, como películas, diagramas, presentaciones, galerías, objetos 3D y reseñas de capítulos. Para interactuar con un objeto multimedia, púlselo, deslícelo o pellízquelo. Por ejemplo, en una presentación puede pulsar para iniciar su reproducción y, después, pulsar el botón para ver cada pantalla. Para ver un elemento a pantalla completa, realice un movimiento de pellizco con dos dedos hacia fuera. Cuando haya terminado, pellízquelo para cerrarlo. Estudio de notas y listas de vocabulario En los libros compatibles con esta función, puede utilizar la vista de notas para revisar todos los resaltados y notas a través de tarjetas. Visualizar las notas: Pulse . También puede: • Visualizar las notas por capítulo: Pulse un capítulo para ver las notas que contiene. Los globos que aparecen en la lista de capítulos indican el número de notas y resaltados que ha añadido a cada capítulo. Si no le aparece la lista de capítulos, pulse el botón Capítulo. • Realizar una búsqueda en todas las notas: Escriba una palabra o una frase en el campo de búsqueda. Si no le aparece el campo de búsqueda, pulse el botón Capítulos. Pulse un capítulo para ver las notas que contiene. • Revisar las notas y el vocabulario a través de tarjetas de estudio: Pulse “Tarjetas de estudio”. Deslice el dedo para pasar de una tarjeta a otra. Si una tarjeta contiene notas (se indica mediante ), púlsela para darle la vuelta. Pulse para seleccionar los resaltados mostrados o para ordenar las tarjetas de forma aleatoria. Si el capítulo contiene una lista de vocabulario, puede incluirla también en las tarjetas. • Enviar las notas por correo: Pulse . Seleccione las notas que desee compartir y, a continuación, pulse “Enviar por correo”. • Eliminar notas: Pulse . Seleccione las notas que desee eliminar y, a continuación, pulse Eliminar.Capítulo 23 iBooks 97 Organización de la estantería Utilice la estantería para explorar sus libros y documentos PDF. También es posible organizar los ítems en colecciones. Mantenga pulsado un libro para reorganizarlo. Mantenga pulsado un libro para reorganizarlo. Disponible en la iBookstore. La disponibilidad de los títulos puede variar. Disponible en la iBookstore. La disponibilidad de los títulos puede variar. Mover un libro o PDF a una colección: Vaya a la estantería y pulse Editar. Seleccione los ítems que desee mover y, a continuación, pulse Trasladar y seleccione una colección. Ver y gestionar colecciones: Pulse Colecciones. Para editar el nombre de una colección, pulse Editar. No es posible editar ni eliminar las colecciones integradas Libros y PDF. Ordenar la estantería: Pulse y, a continuación, seleccione uno de los métodos de ordenación en la parte inferior de la pantalla. Eliminar un ítem de la estantería: Pulse Editar y, a continuación, pulse los libros o documentos PDF que desee eliminar para que aparezca una marca de verificación. Pulse Eliminar. Cuando acabe, pulse Salir. Si borra un libro que ha comprado, puede descargarlo de nuevo en Compras en la tienda iBookstore. Buscar un libro: Vaya a la estantería. Pulse la barra de estado para desplazarse a la parte superior de la pantalla y, a continuación, pulse . La búsqueda se realiza por el título y el nombre del autor. Sincronización de libros y documentos PDF Utilice iTunes para sincronizar sus libros y documentos PDF entre el iPad y el ordenador, y para comprar libros en la tienda iTunes Store. Cuando el iPad está conectado al ordenador, el panel Libros le permite seleccionar los ítems que desea sincronizar. También puede encontrar en Internet libros en formato ePub sin DRM y archivos PDF que puede añadir a su biblioteca de iTunes. Sincronizar un libro o un archivo PDF con el iPad: En iTunes en su ordenador, seleccione Archivo > Añadir a la biblioteca y seleccione un archivo .pdf, .epub o .ibooks. Conecte el iPad al ordenador y sincronícelo. Añadir un libro o PDF a iBooks sin realizar una sincronización: Si el libro o PDF no es demasiado grande, envíese un correo electrónico a su dirección desde el ordenador. Abra el mensaje de correo electrónico en el iPad y, a continuación, mantenga pulsado el archivo adjunto y seleccione “Abrir en iBooks” en el menú que aparece.Capítulo 23 iBooks 98 Impresión o envío de un PDF por correo electrónico Puede usar iBooks para enviar una copia de un PDF por correo electrónico o para imprimir total o parcialmente el PDF en una impresora AirPrint. Enviar un PDF por correo electrónico: Abra el PDF, pulse y, a continuación, seleccione “Enviar documento”. Imprimir un PDF: Abra el PDF, pulse y, a continuación, seleccione Imprimir. Para obtener más información, consulte Impresión con AirPrint en la página 34. Ajustes de iBooks iBooks guarda las colecciones, los marcadores, las notas y la información sobre la página actual utilizando su ID de Apple para que pueda leer libros sin interrupción en todos sus dispositivos iOS. iBooks guarda información de todos sus libros al abrir y al cerrar la app. También se guarda información de los libros individuales al abrir o cerrar los libros. Activar o desactivar la sincronización Vaya a Ajustes > iBooks. Algunos libros también pueden ofrecer acceso a archivos de audio o vídeo almacenados en Internet. Si el iPad dispone de una conexión de datos de telefonía móvil, el operador puede aplicar tarifas por la reproducción de estos archivos. Activar o desactivar el acceso a archivos de audio y vídeo: Vaya a Ajustes > iBooks > “Audio y vídeo en línea”. Cambiar la dirección en que gira la página al pulsar el margen izquierdo: Vaya a Ajustes > iBooks > Pulsar margen izq.24 99 Vea los podcasts de su biblioteca. Vea los podcasts de su biblioteca. Explore todos los podcasts disponibles. Explore todos los podcasts disponibles. Explore el episodio más popular y vea una previsualización. Explore el episodio más popular y vea una previsualización. Desplácese para ver toda la biblioteca. Desplácese para ver toda la biblioteca. Pulse un podcast para ver los episodios disponibles. Pulse un podcast para ver los episodios disponibles. Elimine un podcast. Elimine un podcast. Vea los controles de reproducción. Vea los controles de reproducción. Obtener podcasts: • Explorar el catálogo completo: Pulse Catálogo y, a continuación, pulse en cualquier podcast que le interese. • Explore los podcast más populares: Pulse “Top Stations” (si no lo ve, pulse primero Biblioteca). Desplácese a la izquierda o la derecha para cambiar la categoría, o arriba o abajo para explorar la categoría actual. Pulse un podcast para previsualizar el último episodio, o pulse para ver una lista de episodios. • Reproducir un episodio en streaming: Pulse en cualquier episodio. • Descargue un episodio de modo que pueda escucharlo cuando no esté conectado a una red Wi-Fi: Pulse el botón de descarga que aparece junto a cualquier episodio. • Suscríbase a un podcast para disponer siempre del último episodio. Si está explorando el catá- logo, pulse un podcast para ver la lista de episodios y, a continuación, pulse Suscribirse. Si ya ha descargado un episodio, pulse el podcast en su biblioteca, pulse y, después, active Suscripción. • Obtener automáticamente el último episodio de un podcast suscrito: Pulse el podcast en su biblioteca, pulse y, después, active “Descarga automática”. Si no ve el interruptor “Descarga automática”, compruebe que la opción Suscripción esté activada. PodcastsCapítulo 24 Podcasts 100 Controlar la reproducción de audio: Desplácese hacia arriba en la ilustración del podcast en reproducción para ver todos los controles de reproducción. Arrastre el cursor de reproducción para ir a otra parte del podcast. Arrastre el cursor de reproducción para ir a otra parte del podcast. Ajuste la velocidad de reproducción. Ajuste la velocidad de reproducción. Pase al episodio siguiente. Pase al episodio siguiente. Vuelva a reproducir los últimos 10 segundos. Vuelva a reproducir los últimos 10 segundos. Avance 30 segundos. Avance 30 segundos. Reproduzca el episodio anterior. Reproduzca el episodio anterior. Ajuste el temporizador de reposo. Ajuste el temporizador de reposo. Comparta este podcast. Comparta este podcast. Desplácese arriba o abajo para mostrar u ocultar los controles. Desplácese arriba o abajo para mostrar u ocultar los controles. Controlar la reproducción de vídeo: Pulse la pantalla mientras ve un podcast de vídeo.25 101 Visión general Game Center le permite jugar a sus juegos favoritos con amigos que posean un iPhone, iPad, iPod touch o Mac con OS X Mountain Lion. Debe estar conectado a Internet para utilizar Game Center. ADVERTENCIA: Para obtener información importante sobre la prevención de lesiones por movimientos repetitivos, consulte Información importante sobre seguridad en la página 133. Busque retos de sus amigos. Busque retos de sus amigos. Declarar su estado, cambiar su foto o cerrar sesión. Declarar su estado, cambiar su foto o cerrar sesión. Invitar a amigos a jugar. Invitar a amigos a jugar. Seleccionar un juego. Seleccionar un juego. Responda a solicitudes de amistad. Responda a solicitudes de amistad. Juegue una partida. Juegue una partida. Vea quién es el mejor. Vea quién es el mejor. Vea una lista de los objetivos del juego. Vea una lista de los objetivos del juego. Busque un oponente. Busque un oponente. Iniciar sesión: Abra Game Center. Si ve su sobrenombre y su foto en la parte superior de la pantalla Yo, significa que ya ha iniciado sesión. Si no lo ve, introduzca su ID de Apple y su contraseña y, a continuación, pulse Conectarse. Puede utilizar el mismo ID de Apple que utiliza para iCloud o para comprar en la tienda o bien pulsar “Crear nueva cuenta” si desea un ID de Apple aparte para jugar. Comprar un juego: Pulse Juegos y, a continuación, pulse un juego recomendado o pulse “Buscar juegos de Game Center”. Jugar: Pulse Juegos, seleccione un juego y, a continuación, pulse Jugar. Game CenterCapítulo 25 Game Center 102 Volver a Game Center después de jugar: Pulse el botón de inicio y, a continuación, pulse Game Center en la pantalla de inicio. Cerrar sesión: Pulse Yo, pulse el banner de su cuenta y, a continuación, pulse Desconectarse. No es necesario que cierre sesión cada vez que salga de Game Center. Cómo jugar con amigos Invitar a amigos a un juego multijugador: Pulse Amigos, seleccione un amigo, seleccione un juego y, a continuación, pulse Jugar. Si el juego permite o requiere jugadores adicionales, seleccione otros jugadores a los que invitar. A continuación, pulse Siguiente. Envíe su invitación y, después, espere a que los otros jugadores la acepten. Cuando todo el mundo esté listo, comience la partida. Si un amigo no está disponible o no responde a su invitación, puede pulsar “Selección automática” para que Game Center busque jugadores por usted, o bien pulsar “Invitar amigo” para intentar invitar a algún otro amigo. Enviar una solicitud de amistad: Pulse Amigos o Solicitudes, pulse “Añadir amigos” y, a continuación, introduzca la dirección de correo electrónico de su amigo o su sobrenombre en Game Center. Para buscar en los contactos, pulse . Para añadir varios amigos en una misma solicitud, pulse Retorno después de cada dirección. Retar a alguien a superarlo: Pulse una de sus puntuaciones o logros y, a continuación, pulse “Retar a amigos”. Consultar los juegos a los que juega un amigo y sus puntuaciones: Pulse Amigos, pulse el nombre de su amigo y, a continuación, pulse Juegos o Puntos. Comprar un juego que tiene un amigo: Pulse Amigos y, a continuación, pulse el nombre de su amigo. Pulse el juego en la lista de juegos de su amigo y, a continuación, pulse el precio en la parte superior de la pantalla. Ver una lista de los amigos de un amigo: Pulse Amigos, pulse el nombre de un amigo y, a continuación, pulse Amigos, justo debajo de su imagen. Eliminar un amigo: Pulse Amigos, pulse un nombre y, a continuación, pulse “Eliminar amigo”. Mantener privada su dirección de correo electrónico: Desactive “Perfil público” en los ajustes de su cuenta Game Center. Consulte “Ajustes de Game Center”, más adelante. Desactivar las solicitudes de amistad o la actividad multijugador: Vaya a Ajustes > General > Restricciones y desactive “Juegos multijugador” o “Añadir amigos”. Si los controles están desactivados, pulse primero “Activar restricciones” (en la parte superior). Informar de comportamientos ofensivos o inapropiados: Pulse Amigos, pulse el nombre de la persona en cuestión y, a continuación, pulse “Informar del problema”. Ajustes de Game Center Algunos ajustes de Game Center están asociados al ID de Apple que utiliza para iniciar sesión. Otros se encuentran en la app Ajustes del iPad. Cambiar los ajustes de Game Center para utilizar su ID de Apple: Inicie sesión con su ID de Apple, pulse Yo, pulse el banner de su cuenta y, a continuación, seleccione “Ver cuenta”. Indicar qué notificaciones desea recibir de Game Center: Vaya a Ajustes > Notificaciones > Game Center. Si Game Center no aparece, active Notificaciones. Cambiar restricciones de Game Center: Vaya a Ajustes > General > Restricciones.26 103 Funciones de accesibilidad El iPad incorpora estas funciones de accesibilidad: • Lector de pantalla VoiceOver • Asistente de voz Siri • Ampliación de zoom • Texto grande • Invertir colores • Leer selección • Leer texto automático • Audio mono y balance • Tonos asignables • Acceso guiado • AssistiveTouch • Soporte para pantallas Braille • Reproducción de contenido con subtítulos Activar funciones de accesibilidad con el iPad: Vaya a Ajustes > General > Accesibilidad. Activar funciones de accesibilidad con iTunes: Conecte el iPad al ordenador y seleccione el iPad en la lista de dispositivos de iTunes. Haga clic en Resumen y, a continuación, haga clic en “Configurar Acceso Universal” en la parte inferior de la pantalla Resumen. Para obtener más información sobre las características de accesibilidad del iPad, vaya a www.apple.com/es/accessibility. VoiceOver VoiceOver describe en voz alta los elementos que aparecen en la pantalla, para que pueda utilizar el iPad sin verlo. VoiceOver informa de cada ítem que se selecciona en la pantalla. Cuando se selecciona un ítem, se resalta con el cursor de VoiceOver (un rectángulo de color negro) y VoiceOver pronuncia el nombre del ítem o lo describe. Toque la pantalla o arrastre los dedos para escuchar distintos ítems de la pantalla. Cuando se selecciona texto, VoiceOver lo lee. Si activa “Leer indicaciones”, VoiceOver puede decirle el nombre del ítem y facilitarle instrucciones como, por ejemplo, “pulse dos veces para abrir”. Para interactuar con ítems de la pantalla, como botones y enlaces, use los gestos que se describen en Aprendizaje de gestos de VoiceOver en la página 106. AccesibilidadCapítulo 26 Accesibilidad 104 Al pasar a una pantalla nueva, VoiceOver emite un sonido y, a continuación, selecciona el primer ítem de la pantalla (normalmente, el ítem situado en la esquina superior izquierda) y lo lee en alto. VoiceOver también le informa cuando la pantalla cambia entre las orientaciones vertical y horizontal, y cuando la pantalla se bloquea y desbloquea. Nota: VoiceOver habla en el idioma especificado en los ajustes Internacional, un aspecto que puede verse afectado por el ajuste “Formato regional” de Ajustes > General > Internacional. VoiceOver está disponible en numerosos idiomas, aunque no en todos. Nociones básicas sobre VoiceOver Importante: VoiceOver cambia los gestos que usted utiliza para controlar el iPad. Una vez activado, deberá usar los gestos de VoiceOver para controlar el iPad, incluso para desactivar la propia función y reanudar la operación normal. Activar o desactivar VoiceOver: Vaya a Ajustes > General > Accesibilidad > VoiceOver. También puede ajustar la función “Clic triple en Inicio” para activar o desactivar VoiceOver. Consulte Clic triple en Inicio en la página 113. Explorar la pantalla: Arrastre el dedo sobre la pantalla. VoiceOver dirá en voz alta cada ítem que toque. Levante el dedo para dejar un ítem seleccionado. • Seleccionar un ítem: Púlselo o levante el dedo mientras lo arrastra sobre él. • Seleccionar el ítem siguiente o el anterior: Desplácese a la derecha o a la izquierda con un dedo. El orden de los ítems es de izquierda a derecha y de arriba a abajo. • Seleccionar el ítem superior o inferior: Utilice el rotor para activar la “Navegación vertical” y deslice un dedo hacia arriba o hacia abajo. • Seleccionar el primer o el último ítem de la pantalla: Deslice cuatro dedos hacia arriba o hacia abajo. • Seleccionar un ítem por el nombre: Pulse tres veces con dos dedos en cualquier lugar de la pantalla para abrir el “Selector de ítem”. A continuación, escriba un nombre en el campo de búsqueda, o desplácese hacia la derecha o hacia la izquierda para moverse por la lista alfabética, o pulse el índice alfabético situado a la derecha de la lista y desplácese hacia arriba o hacia abajo para moverse rápidamente por la lista de ítems. • Cambiar el nombre de un ítem seleccionado para que sea más fácil de encontrar: Pulse dos veces y mantenga pulsado con dos dedos en cualquier lugar de la pantalla. • Leer el texto del ítem seleccionado: Ajuste el control de rotor a caracteres o palabras y desplá- cese hacia abajo o hacia arriba con un dedo. • Activar o desactivar las indicaciones habladas: Vaya a Ajustes > General > Accesibilidad > VoiceOver. • Incluir la ortografía fonética: Vaya a Ajustes > General > Accesibilidad > VoiceOver > Alfabeto por palabras. • Leer todos los elementos de la pantalla desde la parte superior: Desplace dos dedos hacia arriba. • Leer desde el ítem actual hasta el final de la pantalla: Desplace dos dedos hacia abajo. • Detener la locución: Pulse una vez con dos dedos. Pulse de nuevo con dos dedos para reanudar la pronunciación. La lectura se reanuda automáticamente al seleccionar otro ítem. • Silenciar VoiceOver: Pulse dos veces con tres dedos. Vuelva a pulsar dos veces con tres dedos para activar el habla de nuevo. Para desactivar únicamente los sonidos de VoiceOver, ajuste el interruptor de tono/silencio en Silencio. Si hay un teclado externo conectado, también puede pulsar la tecla Control para activar o desactivar el sonido de VoiceOver.Capítulo 26 Accesibilidad 105 Ajustar la voz: Puede ajustar las características de la voz de VoiceOver para que le resulte más fácil comprenderla: • Cambiar el volumen del habla: Utilice los botones de volumen del iPad. También puede añadir volumen al rotor y, a continuación, desplazarse hacia arriba y hacia abajo para ajustarlo; para ello, consulte Uso del control de rotor de VoiceOver en la página 108. • Cambiar la velocidad del habla: Vaya a Ajustes > General > Accesibilidad > VoiceOver y arrastre el regulador “Velocidad de habla”. También puede añadir “Velocidad de habla” al rotor y, a continuación, desplazarse hacia arriba o hacia abajo para realizar ajustes. • Usar cambios de tono: VoiceOver utiliza un tono más alto al pronunciar el primer elemento de un grupo (como una lista o una tabla) y un tono más bajo al pronunciar el último elemento. Vaya a Ajustes > General > Accesibilidad > VoiceOver > Cambio de tono. • Cambiar el idioma del iPad: Vaya a Ajustes > General > Internacional > Idioma. La pronunciación de VoiceOver en algunos idiomas varía según el ajuste de Ajustes > General > Internacional > Formato regional. • Cambiar la pronunciación: Ajuste el rotor a Idioma y desplácese hacia arriba o hacia abajo. La opción “Idioma” solo estará disponible en el rotor si selecciona más de una pronunciación. • Seleccionar las pronunciaciones disponibles en el rotor de idiomas: Vaya a Ajustes > General > Accesibilidad > VoiceOver > Rotor de idiomas. Para cambiar la posición de un idioma en la lista, arrastre hacia arriba o hacia abajo. • Cambiar la voz de lectura básica: Vaya a Ajustes > General > Accesibilidad > VoiceOver > Usar voz compacta. Uso del iPad con VoiceOver Desbloquear el iPad: Seleccione Desbloquear y pulse dos veces la pantalla. “Pulsar” para activar el ítem seleccionado: Pulse dos veces en cualquier parte de la pantalla. “Pulsar dos veces” el ítem seleccionado: Pulse tres veces en cualquier parte de la pantalla. Ajustar un regulador: Seleccione el regulador y, a continuación, desplácese hacia arriba o hacia abajo con un solo dedo. Utilizar un gesto estándar cuando VoiceOver está activado: Pulse dos veces y mantenga el dedo sobre la pantalla. Una serie de tonos indican que están activos los gestos normales. Se mantendrán activos hasta que suelte el dedo, momento en el que se reanudarán los gestos de VoiceOver. Desplazarse por una lista o área de la pantalla: Deslice tres dedos hacia arriba o hacia abajo. Si se está desplazando por las páginas de una lista, VoiceOver leerá el intervalo de ítems mostrados (por ejemplo, “mostrando filas 5 a 10”). También puede desplazarse de modo continuo por una lista, en lugar de desplazarse por sus páginas. Pulse dos veces y mantenga la pulsación. Cuando oiga una serie de tonos, mueva el dedo hacia arriba o hacia abajo para desplazarse por la lista. El desplazamiento continuo se detendrá cuando suelte el dedo. • Desplazarse de forma continua por una lista: Pulse dos veces y mantenga la pulsación. Cuando oiga una serie de tonos, mueva el dedo hacia arriba o hacia abajo para desplazarse por la lista. El desplazamiento continuo se detendrá cuando suelte el dedo.Capítulo 26 Accesibilidad 106 • Usar un índice de lista: Algunas listas incluyen un índice alfabético en la parte derecha de la pantalla. No es posible seleccionar el índice desplazándose entre los ítems; es necesario tocar el índice directamente para seleccionarlo. Con el índice seleccionado, desplácese hacia arriba o hacia abajo para moverse por el índice. También puede pulsar dos veces y deslizar el dedo hacia arriba o hacia abajo. • Reordenar una lista: Puede cambiar el orden de los elementos de algunas listas, como los ajustes del rotor y del rotor de idiomas en los ajustes de Accesibilidad. Seleccione situado a la derecha de un ítem, púlselo dos veces y mantenga la última pulsación hasta que oiga un sonido; a continuación, arrástrelo hacia arriba o hacia abajo. VoiceOver pronuncia el ítem que ha movido hacia arriba o hacia abajo, según la dirección en la que arrastre. Reorganizar la pantalla de inicio: En la pantalla de inicio, seleccione el icono que desee mover. Pulse dos veces el icono y mantenga la pulsación; a continuación, arrástrelo. VoiceOver leerá en alto la posición de fila y columna mientras arrastra el icono. Suelte el icono cuando esté en la ubicación que desee. Puede arrastrar otros iconos. Arrastre un ítem hacia el lado izquierdo o derecho de la pantalla para moverlo a una página distinta de la pantalla de inicio. Cuando termine, pulse el botón de inicio . Leer la información de estado del iPad: Pulse la parte superior de la pantalla para escuchar información sobre la hora, la duración de la batería, la intensidad de la señal Wi-Fi y otros datos de interés. Leer notificaciones: Vaya a Ajustes > General > Accesibilidad > VoiceOver y active “Leer notificaciones”. Las notificaciones, incluido el texto de los mensajes de texto entrantes, se leerán en voz alta conforme se produzcan, aunque el iPad esté bloqueado. Las notificaciones de las que no se haya acusado recibo se repetirán cuando se desbloquee el iPad. Activar o desactivar la cortina de pantalla: Pulse tres veces con tres dedos. Si la cortina de pantalla está activada, el contenido de la pantalla estará activo aunque la pantalla esté desactivada. Aprendizaje de gestos de VoiceOver Cuando VoiceOver está activado, los gestos estándar de la pantalla táctil dan lugar a distintos efectos. Estos y otros gestos le permiten desplazarse por la pantalla y controlar cada uno de los ítems seleccionados. Los gestos de VoiceOver incluyen el uso de dos y tres dedos para pulsar o desplazar. Para lograr el mejor resultado posible con los gestos de dos y tres dedos, relaje los dedos y toque la pantalla dejando algo de espacio entre ellos. Puede utilizar distintas técnicas para introducir gestos de VoiceOver. Por ejemplo, puede introducir una pulsación de dos dedos utilizando dos dedos de una mano o un dedo de cada mano. También puede utilizar los pulgares. Muchos usuarios encuentran muy eficaz el gesto de la “pulsación dividida”: en vez de seleccionar un ítem y pulsarlo dos veces, puede pulsar un ítem con un dedo, mantenerlo pulsado y, entonces, pulsar la pantalla con otro dedo. Pruebe con distintas técnicas para averiguar cuál es la que mejor le va. Si sus gestos no funcionan, pruebe realizando movimientos más rápidos, especialmente en el caso de los gestos de doble pulsación y desplazamiento. Para desplazarse, pruebe a barrer la pantalla rápidamente con el dedo o los dedos. Cuando VoiceOver está activado, aparece el botón “Práctica de VoiceOver”, que le da la oportunidad de practicar los gestos de VoiceOver antes de continuar. Practicar los gestos de VoiceOver: Vaya a Ajustes > General > Accesibilidad > VoiceOver y, a continuación, pulse “Práctica de VoiceOver”. Cuando termine de practicar, pulse Salir. Si no ve el botón “Práctica de VoiceOver”, asegúrese de que VoiceOver esté activado.Capítulo 26 Accesibilidad 107 A continuación se muestra un resumen de los gestos más importantes de VoiceOver: Navegar y leer • Pulsación: Pronunciar el ítem. • Deslizamiento a derecha o izquierda: Seleccionar el siguiente ítem o el ítem anterior. • Deslizamiento hacia arriba o hacia abajo: Depende del ajuste del control de rotor. Consulte Uso del control de rotor de VoiceOver en la página 108. • Pulsación con dos dedos: Detener la pronunciación del ítem actual. • Deslizamiento hacia arriba con dos dedos: Leer todo desde la parte superior de la pantalla. • Deslizamiento hacia abajo con dos dedos: Leer todo desde la posición actual. • Barrido con dos dedos: Mover dos dedos de un lado a otro tres veces rápidamente (dibujando una “z”) para descartar una alerta o ir a la pantalla anterior. • Deslizamiento hacia arriba o hacia abajo con tres dedos: Pasar una página cada vez. • Deslizamiento a la derecha o a la izquierda con tres dedos: Ir a la siguiente página o a la página anterior (como la pantalla de inicio, Bolsa o Safari). • Pulsación con tres dedos: Leer información adicional, como la posición dentro de una lista o si hay texto seleccionado. • Pulsación con cuatro dedos en la parte superior de la pantalla: Seleccionar el primer ítem de la página. • Pulsación con cuatro dedos en la parte inferior de la pantalla: Seleccionar el último ítem de la página. Activar • Doble pulsación: Activar el ítem seleccionado. • Tripe pulsación: Pulsar dos veces un ítem. • Pulsación dividida: En lugar de seleccionar un ítem y pulsarlo dos veces para activarlo, puede pulsar un ítem con un dedo y, a continuación, pulsar la pantalla con otro dedo. • Pulsar dos veces y mantener la pulsación (1 segundo) + gesto estándar: Usar un gesto estándar. El gesto de doble pulsación y mantenimiento indica al iPad que debe interpretar el siguiente gesto como un gesto estándar. Por ejemplo, puede pulsar dos veces y mantener la pulsación y, a continuación, sin soltar el dedo, arrastrarlo para regular un interruptor. • Doble pulsación con dos dedos: Reproducir o poner en pausa Música, Vídeos, Notas de Voz o Fotos. Hacer una fotografía en Cámara. Iniciar o detener la grabación de la cámara o las notas de voz. Iniciar o detener el cronómetro. • Pulsar dos veces con dos dedos y mantener la pulsación: Reetiqueta el ítem seleccionado. • Triple pulsación con dos dedos: Abrir el “Selector de ítem”. • Doble pulsación con tres dedos: Activar o desactivar sonido de VoiceOver. • Triple pulsación con tres dedos: Activar o desactivar la cortina de pantalla.Capítulo 26 Accesibilidad 108 Uso del control de rotor de VoiceOver Use el rotor para seleccionar lo que ocurrirá cuando se desplace hacia arriba o hacia abajo con VoiceOver activado. Funcionamiento de un rotor: Gire dos dedos sobre la pantalla del iPad alrededor de un punto situado entre ambos. Cambiar las opciones incluidas en el rotor: Vaya a Ajustes > General > Accesibilidad > VoiceOver > Rotor y, a continuación, seleccione las opciones que desee que estén disponibles mediante el uso del rotor. Las posiciones disponibles del rotor y sus efectos dependerán de lo que esté haciendo. Por ejemplo, si está leyendo un mensaje de correo electrónico, puede utilizar el rotor para pasar de escuchar la pronunciación del texto palabra por palabra a carácter por carácter, o viceversa, desplazándose hacia arriba o hacia abajo. Si está navegando por una página web, puede ajustar el rotor para leer todo el texto (palabra por palabra o carácter por carácter) o para saltar de un ítem a otro de un tipo determinado, como títulos o enlaces. Introducción y edición de texto con VoiceOver Al escribir en un campo de texto editable, puede utilizar el teclado en pantalla o un teclado externo conectado al iPad para introducir texto. Introducir texto: Seleccione un campo de texto editable, pulse dos veces para mostrar el punto de inserción y el teclado en pantalla y, a continuación, escriba caracteres. • Escritura normal: Seleccione una tecla del teclado deslizando un dedo hacia la izquierda o hacia la derecha y pulse dos veces para introducir el carácter. Otra opción consiste en desplazar el dedo por el teclado para seleccionar una tecla y, mientras mantiene pulsada la tecla con un dedo, pulsar la pantalla con otro dedo. VoiceOver pronuncia la tecla al seleccionarla y vuelve a pronunciarla al introducir el carácter. • Escritura táctil: Toque una tecla del teclado para seleccionarla y levante el dedo para introducir el carácter. Si toca una tecla equivocada, desplace el dedo por el teclado hasta que seleccione la tecla deseada. VoiceOver pronuncia el carácter de cada tecla que toca, pero no introducirá ningún carácter hasta que levante el dedo. La escritura al tacto solo funciona con las teclas que introducen texto. Utilice la escritura normal para las demás teclas, como Mayúsculas, Suprimir y Retorno. • Seleccionar la escritura normal o la escritura táctil: Si VoiceOver está activado y hay una tecla seleccionada en el teclado, utilice el rotor para seleccionar el tipo de escritura y, a continuación, deslice el dedo hacia arriba o hacia abajo. Mover el punto de inserción: Realice un deslizamiento hacia arriba o hacia abajo para mover el punto de inserción hacia delante o hacia atrás en el texto. Use el rotor para indicar si desea mover el punto de inserción carácter por carácter, palabra por palabra o línea a línea. VoiceOver emite un sonido cuando el punto de inserción se mueve, y pronuncia el carácter, la palabra o la línea a donde se ha desplazado el punto de inserción. Al avanzar por palabras, el punto de inserción se coloca al final de cada palabra, antes del espacio o signo de puntuación posterior a la palabra. Al retroceder, el punto de inserción se coloca al final de la palabra precedente, antes del espacio o signo de puntuación posterior a aquella.Capítulo 26 Accesibilidad 109 Mover el punto de inserción más allá de la puntuación al final de una palabra o frase: Use el rotor para volver al modo de carácter. Al mover el punto de inserción línea a línea, VoiceOver pronuncia cada una de las líneas mientras se desplaza. Al avanzar, el punto de inserción se coloca al principio de la siguiente línea (excepto cuando se alcanza la última línea de un párrafo: en ese caso, el punto de inserción se coloca al final de la línea que acaba de pronunciarse). Al retroceder, el punto de inserción se coloca al principio de la línea pronunciada. Cambiar la función de pronunciar al escribir: Vaya a Ajustes > General > Accesibilidad > VoiceOver > Pronunciar al escribir. Usar el alfabeto por palabras al pronunciar lo que se escribe: Vaya a Ajustes > General > Accesibilidad > VoiceOver > Alfabeto por palabras. El texto se leerá carácter por carácter. VoiceOver pronuncia primero el carácter y, a continuación, su equivalente fonético; por ejemplo, “f” y después “foxtrot”. Eliminar un carácter: Seleccione y pulse dos veces o realice una pulsación dividida. Debe hacerlo así incluso en el modo de escritura táctil. Para eliminar varios caracteres, mantenga pulsada la tecla Suprimir y pulse la pantalla con otro dedo una vez por cada carácter que desee borrar. VoiceOver pronunciará el carácter mientras lo elimina. Si la opción “Cambio de tono” está activada, VoiceOver pronuncia los caracteres eliminados en un tono más bajo. Seleccionar texto: Ajuste el rotor a Edición, deslice hacia arriba o hacia abajo para elegir entre Seleccionar o “Seleccionar todo” y, a continuación, pulse dos veces. Si elige Seleccionar, se seleccionará la palabra situada más cerca del punto de inserción al pulsar dos veces. Si elige “Seleccionar todo”, se seleccionará todo el texto. Pellizque para ampliar o reducir la selección. Cortar, copiar o pegar: Asegúrese de que el rotor esté ajustado en el modo de edición. Seleccione el texto, desplácese hacia arriba o hacia abajo para seleccionar Cortar, Copiar o Pegar y, a continuación, pulse dos veces. Deshacer: Agite el iPad, desplácese hacia la izquierda o hacia la derecha para seleccionar la acción que desee deshacer y, a continuación, pulse dos veces. Introducir un carácter acentuado: En el modo de escritura normal, seleccione el carácter sin acento y, a continuación, pulse dos veces y mantenga la pulsación hasta que oiga un sonido que indique la aparición de caracteres acentuados. Arrastre hacia la izquierda o hacia la derecha para seleccionar y escuchar las opciones. Suelte el dedo para introducir la selección actual. Cambiar el idioma del teclado: Ajuste el rotor a Idioma y desplácese hacia arriba o hacia abajo. Seleccione “Idioma por omisión” para utilizar el idioma especificado en los ajustes Internacional. El rotor de idiomas aparece si selecciona más de un idioma en Ajustes > General > Accesibilidad > VoiceOver > Rotor de idiomas. Uso de VoiceOver con Safari Cuando realice búsquedas en Internet con Safari y la opción VoiceOver activada, los ítems del rotor “Resultados de la búsqueda” le permitirán escuchar la lista de las frases de búsqueda sugeridas. Buscar en Internet: Seleccione un campo de búsqueda, introduzca la búsqueda y, a continuación, deslice hacia la derecha o hacia la izquierda para desplazar la lista de frases de búsqueda sugeridas hacia arriba o hacia abajo. A continuación, pulse dos veces la pantalla para buscar en Internet la frase seleccionada.Capítulo 26 Accesibilidad 110 Ajustar las opciones del rotor para navegar por Internet: Vaya a Ajustes > General > Accesibilidad > VoiceOver > Rotor. Pulse para seleccionar las opciones o anular su selección, o arrastre hacia arriba para cambiar la posición de un ítem. Omitir las imágenes al navegar: Vaya a Ajustes > General > Accesibilidad > VoiceOver > Explorar imágenes. Puede seleccionar que se omitan todas las imágenes o solo las que no incluyan descripciones. Reducir los elementos de una página para facilitar la lectura y la navegación: Seleccione el ítem Lector en el campo de dirección de Safari (no disponible en todas las páginas). Uso de VoiceOver con Mapas Con VoiceOver, puede acercar o alejar la imagen, seleccionar un marcador u obtener información sobre una ubicación. Explorar el mapa: Arrastre el dedo por la pantalla o deslice hacia la izquierda o hacia la derecha para desplazarse a otro ítem. Acercar o alejar la imagen: Seleccione el mapa, ajuste el rotor a Zoom y, a continuación, deslice hacia arriba o hacia abajo con un dedo. Desplazar el mapa: Deslice con tres dedos. Explorar puntos visibles de interés: Ajuste el rotor a “Puntos de interés” y deslice un dedo hacia arriba o hacia abajo. Seguir una carretera: Mantenga el dedo sobre la carretera, espere hasta oír “pausa para seguir” y, a continuación, mueva el dedo a lo largo de la carretera mientras escucha el tono de guía. El tono subirá si se aleja de la carretera. Seleccionar un marcador: Toque un marcador, o deslice hacia la izquierda o hacia la derecha para seleccionar el marcador. Obtener información sobre una ubicación: Con un marcador seleccionado, pulse dos veces para mostrar el indicador de información. Deslice hacia la izquierda o hacia la derecha para seleccionar el botón “Más información” y, a continuación, pulse dos veces para mostrar la página de información. Edición de vídeos con VoiceOver Puede utilizar gestos de VoiceOver para acortar los vídeos de la cámara. Cortar un vídeo: Mientras visualiza un vídeo, pulse dos veces la pantalla para mostrar los controles de vídeo. Seleccione el comienzo o el final de la herramienta Acortar. A continuación, desplá- cese hacia arriba para arrastrar a la derecha, o hacia abajo para arrastrar a la izquierda. VoiceOver indicará la cantidad de tiempo que la posición actual acortará de la grabación. Para completar el acortamiento, seleccione Cortar y pulse dos veces. Cómo controlar VoiceOver con un teclado inalámbrico de Apple Puede controlar VoiceOver con un teclado inalámbrico de Apple enlazado con el iPad. Consulte Dispositivos Bluetooth en la página 35. Puede usar los comandos de teclado de VoiceOver para desplazarse por la pantalla, seleccionar elementos, leer el contenido de la pantalla, ajustar el rotor y realizar otras acciones de VoiceOver. Todos los comandos de teclado (excepto uno) incluyen Control + Opción, que aparece abreviado como “CO” en la tabla siguiente. Capítulo 26 Accesibilidad 111 La Ayuda VoiceOver lee en alto las teclas o los comandos de teclado mientras los escribe. Puede usar la Ayuda VoiceOver para obtener información acerca de la disposición del teclado y de las acciones asociadas a las distintas combinaciones de teclas. Comandos de teclado de VoiceOver CO = Control + Opción • Leer todo a partir de la posición actual: CO + A • Leer desde la parte superior: CO + B • Ir a la barra de estado: CO + M • Pulsar el botón de inicio: CO + H • Seleccionar el ítem siguiente o el anterior: CO + flecha derecha o CO + flecha izquierda • Pulsar un ítem: CO + barra espaciadora • Pulsar dos veces con dos dedos: CO + “-” • Seleccionar el ítem siguiente del rotor o el anterior: CO + flecha arriba o CO + flecha abajo • Seleccionar el ítem siguiente del rotor de habla o el anterior: CO + Comando + flecha izquierda o CO + Comando + flecha derecha • Ajustar el ítem del rotor de habla: CO + Comando + flecha arriba o CO + Comando + flecha abajo • Activar o desactivar el sonido de VoiceOver: CO + S • Activar o desactivar la cortina de pantalla: CO + Mayúsculas + S • Activar la Ayuda VoiceOver: CO + K • Volver a la pantalla anterior o desactivar la Ayuda VoiceOver: Esc Navegación rápida Active la función de navegación rápida para controlar VoiceOver con las flechas de dirección. • Activar o desactivar la función de navegación rápida: Flecha izquierda + flecha derecha • Seleccionar el ítem siguiente o el anterior: Flecha derecha o flecha izquierda • Seleccionar el ítem siguiente o el anterior especificado por el ajuste del rotor: Flecha arriba o flecha abajo • Seleccionar el primer o el último ítem: Control + flecha arriba o Control + flecha abajo • “Pulsar” un ítem: Flecha arriba + flecha abajo • Desplazarse hacia arriba, hacia abajo, hacia la izquierda o hacia la derecha: Opción + flecha arriba, Opción + flecha abajo, Opción + flecha izquierda u Opción + flecha derecha • Cambiar el rotor: Flecha arriba + flecha izquierda o flecha arriba o + flecha derecha Navegación rápida de una sola letra para Internet Cuando visualice una página web con la función de navegación rápida activada, podrá utilizar las siguientes teclas del teclado para desplazarse rápidamente por la página. Al pulsar la tecla se trasladará al siguiente ítem del tipo indicado. Para ir al ítem anterior, mantenga pulsada la tecla Mayúsculas al teclear la letra. • Título: H • Enlace: L • Campo de texto: R • Botón: B • Control de formulario: C • Imagen: ICapítulo 26 Accesibilidad 112 • Tabla: T • Texto estático: S • Punto de referencia ARIA: W • Lista: X • Ítem del mismo tipo: M • Cabecera de nivel 1: 1 • Cabecera de nivel 2: 2 • Cabecera de nivel 3: 3 • Cabecera de nivel 4: 4 • Cabecera de nivel 5: 5 • Cabecera de nivel 6: 6 Uso de una pantalla Braille con VoiceOver Puede utilizar una pantalla Braille Bluetooth para leer en Braille la salida de texto de VoiceOver, y puede utilizar una pantalla Braille con teclas de entrada y otros controles para controlar el iPad cuando VoiceOver está activado. El iPad es compatible con muchos modelos de pantallas Braille inalámbricas. Puede consultar una lista de las pantallas Braille compatibles en www.apple.com/es/accessibility/iphone/braille-display.html. Configurar una pantalla Braille: Encienda la pantalla y, a continuación, vaya a Ajustes > General > Bluetooth y active Bluetooth. Después, vaya a Ajustes > General > Accesibilidad > VoiceOver > Braille y seleccione la pantalla. Activar o desactivar el sistema Braille de ocho puntos o contraído: Vaya a Ajustes > General > Accesibilidad > VoiceOver > Braille. Para obtener información sobre comandos comunes de Braille para la navegación en VoiceOver, así como para obtener información específica de determinadas pantallas, vaya a http://support.apple.com/kb/HT4400?viewlocale=es_ES. La pantalla Braille utiliza el idioma especificado para “Control por voz”. Normalmente se trata del idioma ajustado para el iPad en Ajustes > Internacional > Idioma. Puede usar el ajuste de idioma de VoiceOver para ajustar otro idioma para VoiceOver y para las pantallas Braille. Ajustar el idioma para VoiceOver: Vaya a Ajustes > General > Internacional > “Control por voz” y, a continuación, seleccione el idioma. Si cambia el idioma del iPad, es posible que deba volver a ajustar el idioma para VoiceOver y la pantalla Braille. Puede usar la celda del extremo izquierdo o derecho de la pantalla Braille para ver el estado del sistema y demás información: • El historial de avisos contiene un mensaje no leído • El mensaje actual del historial de avisos no se ha leído • El habla de VoiceOver está silenciada • El nivel de batería del iPad es bajo (menos del 20% de la carga) • El iPad está en orientación horizontal • La pantalla está apagada • La línea actual contiene texto adicional a la izquierda • La línea actual contiene texto adicional a la derechaCapítulo 26 Accesibilidad 113 Ajustar la celda del extremo izquierdo o derecho para que muestre información de estado: Vaya a Ajustes > General > Accesibilidad > VoiceOver > Braille > “Celda de estado” y, a continuación, pulse Izquierda o Derecha. Ver una descripción ampliada de la celda de estado: En la pantalla Braille, pulse el botón posicionador de la celda de estado. Siri Con Siri, puede realizar operaciones con su iPad, como abrir apps, simplemente pidiéndoselo, y VoiceOver puede leerle las respuestas de Siri. Para obtener información, consulte ¿Qué es Siri? en la página 39. Clic triple en Inicio Hacer clic triple rápidamente en el botón Inicio le permite activar o desactivar algunas funciones de Accesibilidad. Puede usar la función “Clic triple en Inicio” para: • VoiceOver • Invertir colores • Zoom • AssistiveTouch • Acceso Guiado (clic triple en Inicio pone en marcha el Acceso Guiado si ya está activado. Consulte Acceso Guiado en la página 115. Ajustar la función “Clic triple en Inicio”: Vaya a Ajustes > General > Accesibilidad > Clic triple en Inicio. Si selecciona más de uno, se le preguntará cuál quiere controlar cuando haga clic triple en el botón Inicio. Reducir la velocidad de clic: Vaya a Ajustes > General > Accesibilidad > Velocidad de clic. Zoom Muchas apps del iPod touch le permiten acercar o alejar ítems concretos. Por ejemplo, en Safari puede pulsar dos veces o pellizcar para ampliar las columnas de una página web. Además, la función de accesibilidad Zoom le permite agrandar la pantalla entera de cualquier aplicación que esté utilizando. Es posible usar Zoom junto con VoiceOver. Para acercar o alejar la imagen: Vaya a Ajustes > General > Accesibilidad > Zoom. O bien, use “Clic triple en Inicio”. Consulte Clic triple en Inicio en la página 113. Acercar o alejar la imagen: Pulse dos veces la pantalla con tres dedos. Variar la ampliación: Pulse con tres dedos y arrastre hacia arriba o hacia abajo. El gesto de pulsar y arrastrar es similar al de pulsar dos veces, salvo que tras la segunda pulsación no se levantan los dedos, sino que se arrastran sobre la pantalla. Cuando empiece a arrastrar, podrá arrastrar con un solo dedo. El iPad volverá a la ampliación ajustada cuando se aleje y vuelva a acercarse mediante la doble pulsación con tres dedos.Capítulo 26 Accesibilidad 114 Desplazar la pantalla: Mientras la pantalla está ampliada, arrastre tres dedos por la misma. Una vez que empiece a arrastrar, puede hacerlo con un solo dedo para así ver una mayor superficie de la pantalla. O bien mantenga un único dedo cerca del borde de la pantalla para desplazarse hacia ese lado. Acerque el dedo al borde para desplazarse a mayor velocidad. Al abrir una nueva pantalla, el zoom se dirige a la mitad superior de la pantalla. Cuando se usa el zoom con un teclado inalámbrico Apple Wireless Keyboard, la imagen de la pantalla sigue al punto de inserción, manteniéndolo centrado en la pantalla. Consulte Teclado inalámbrico de Apple en la página 28. Texto grande La opción “Texto grande” le permite aumentar el tamaño del texto en las alertas y en Calendario, Contactos, Mail, Mensajes y Notas. Ajustar el tamaño del texto: Vaya a Ajustes > General > Accesibilidad > Texto grande. Invertir colores A veces, si se invierten los colores de la pantalla del iPad, puede resultar más fácil leerla. Cuando Invertir colores está activado, la pantalla parece el negativo de una fotografía. Invertir los colores de la pantalla: Vaya a Ajustes > General > Accesibilidad > Invertir colores. Leer selección Incluso con VoiceOver desactivado, puede hacer que el iPad lea en voz alta cualquier texto que seleccione. Activar “Leer selección”: Vaya a Ajustes > General > Accesibilidad > Leer selección. Aquí también puede: • Ajustar la velocidad de lectura • Elegir que se resalten las palabras a medida que se leen Hacer que el sistema lea un texto: Seleccione el texto y pulse Voz. Leer texto automático La opción “Leer texto automático” lee las correcciones de texto y las sugerencias que el iPad realiza mientras escribe. Activar o desactivar “Leer texto automático”: Vaya a Ajustes > General > Accesibilidad > Leer texto automático. “Leer texto automático” también funciona con VoiceOver y Zoom. Audio mono La función “Audio mono” combina el sonido de los canales izquierdo y derecho en una señal mono que se emite por ambos lados. De este modo, los usuarios con deficiencias auditivas en un oído pueden escuchar la señal completa por el otro. Activar o desactivar el audio mono y ajustar el balance: Vaya a Ajustes > General > Accesibilidad > “Audio mono”.Capítulo 26 Accesibilidad 115 Tonos asignables Puede asignar tonos de llamada distintos a las personas de su lista de contactos para la identificación audible de llamadas de FaceTime. También puede asignar distintos tonos de alerta a eventos como, por ejemplo, un nuevo mensaje de voz, nuevo correo electrónico, envío de correo, tuit, publicación de Facebook y recordatorios. Consulte Sonidos en la página 126. Puede adquirir tonos en la tienda iTunes Store desde el iPad. Consulte Capítulo 20, La tienda iTunes Store, en la página 89. Acceso Guiado Acceso Guiado ayuda al usuario del iPad a centrarse en una tarea concreta. Acceso Guiado restringe el iPad a una sola app y le permite controlar qué funciones de la app están disponibles. Utilice Acceso Guiado para: • Restringir temporalmente el uso del iPad a una app concreta. • Desactivar zonas de la pantalla que no sean relevantes para una tarea, o zonas en las que un gesto accidental pueda provocar una distracción. • Desactivar los botones físicos del iPad. Utilizar Acceso Guiado: Vaya a Ajustes > General > Accesibilidad > “Acceso Guiado”, donde puede: • Activar o desactivar Acceso Guiado • Establecer un código que controle el uso de Acceso Guiado e impida abandonar una sesión activa • Establecer si el iPad puede entrar en reposo durante una sesión Comenzar una sesión de Acceso Guiado: Abra la aplicación que quiere ejecutar y, a continuación, haga triple clic en el botón Inicio. Configure los ajustes de la sesión y haga clic en Inicio. • Desactivar los controles de aplicación y zonas de la pantalla de la aplicación: Trace un círculo alrededor de la parte de la pantalla que quiera desactivar. Puede utilizar los tiradores para ajustar la zona. • Ignorar todos los toques de pantalla: Desactive Tocar. • Impedir que el iPad cambie de la orientación vertical a la horizontal o que responda a cualquier otro movimiento: Desactive Movimiento. Terminar una sesión de Acceso Guiado: Haga clic triple en el botón Inicio e introduzca el código de Acceso Guiado. AssistiveTouch AssistiveTouch le ayuda a usar el iPad si tiene dificultades para tocar la pantalla o pulsar los botones. Puede usar un accesorio de adaptación compatible (como un joystick) junto con AssistiveTouch para controlar el iPad. También puede utilizar AssistiveTouch sin ningún accesorio para realizar gestos que le resulten complicados. Activar AssistiveTouch: Vaya a Ajustes > General > Accesibilidad > AssistiveTouch. Para ajustar la función “Clic triple en Inicio” y activar o desactivar AssistiveTouch; vaya a Ajustes > General > Accesibilidad > Clic triple en Inicio. Ajustar la velocidad de desplazamiento (con accesorio conectado): Vaya a Ajustes > General > Accesibilidad > AssistiveTouch > Velocidad del cursor. Mostrar u ocultar el menú AssistiveTouch: Haga clic en el botón secundario de su accesorio.Capítulo 26 Accesibilidad 116 Ocultar el botón de inicio (con accesorio conectado): Vaya a Ajustes > General > Accesibilidad > AssistiveTouch > Mostrar menú siempre. Deslice o arrastre con 2, 3, 4 o 5 dedos: Pulse el botón de menú, pulse Gestos y, a continuación, pulse el número de dígitos necesarios para realizar el gesto. Cuando aparezcan los círculos correspondientes en la pantalla, realice un movimiento de desplazamiento o arrastre en la dirección requerida por el gesto. Cuando acabe, pulse el botón de menú. Realizar un gesto de pellizco: Pulse el botón de menú, pulse Favoritos y, a continuación, pulse Pellizcar. Cuando aparezcan los círculos de pellizco, pulse en cualquier parte de la pantalla para mover los círculos de pellizco y, a continuación, arrastre los círculos de pellizco hacia dentro o hacia fuera para realizar un gesto de pellizco. Cuando acabe, pulse el botón de menú. Crear su propio gesto: Pulse el botón de menú, pulse Favoritos y, a continuación, pulse un marcador de gesto vacío. O bien vaya a Ajustes > General > Accesibilidad > AssistiveTouch > Crear nuevo gesto. Bloquear o girar la pantalla, ajustar el volumen del iPad o simular la agitación del iPad: Pulse el botón de menú y, a continuación, pulse Dispositivo. Simular la pulsación del botón de inicio: Pulse el botón de menú y, a continuación, pulse Inicio. Mover el botón de menú: Arrástrelo a cualquier ubicación de la pantalla. Salir de un menú sin realizar ningún gesto: Pulse en cualquier lugar situado fuera del menú. Accesibilidad en OS X Aproveche las funciones de accesibilidad de OS X cuando utilice iTunes para sincronizar la información y los contenidos de su biblioteca de iTunes con el iPad. En el Finder, seleccione Ayuda > “Centro de ayuda” y busque “accesibilidad”. Para obtener más información sobre las funciones de accesibilidad del iPad y OS X, visite www.apple.com/es/accessibility. Tamaño de letra mínimo para los mensajes de Mail Para aumentar la legibilidad del texto, ajuste el tamaño de letra mínimo para el texto de los mensajes de Mail a Grande, Enorme o Gigante. Ajustar el tamaño de letra mínimo para los mensajes de Mail: Vaya a Ajustes > Correo, contactos, calendarios > Tamaño letra mínimo. El ajuste “Texto grande” invalida este tamaño de letra mínimo. Teclados panorámicos En todas las apps que vienen integradas en el iPad se muestra un teclado en pantalla de mayor tamaño cuando gira el iPad en posición horizontal. También puede escribir con un teclado inalámbrico de Apple. Con subtítulos Activar subtítulos para vídeos: Vaya a Ajustes > Vídeos > Con subtítulos. No todos los contenidos de vídeo incluyen subtítulos.27 117 El menú Ajustes le permite configurar el iPad, ajustar opciones de apps, añadir cuentas y cambiar otras preferencias. Consulte otros capítulos para obtener información sobre ajustes de las apps integradas. Por ejemplo, para los ajustes de Safari, consulte Capítulo 5, Safari, en la página 45. Modo Avión El modo Avión desactiva las funciones inalámbricas para reducir la posible producción de interferencias que obstaculicen el funcionamiento del avión y otros equipos eléctricos. Activar el modo Avión: Vaya a Ajustes y active el modo Avión. Cuando el modo Avión está activado, aparece en la barra de estado de la parte superior de la pantalla. No se emiten señales Wi-Fi, Bluetooth ni de telefonía móvil (en los modelos Wi-Fi + cellular) desde el iPad. No podrá utilizar apps ni funciones que dependan de estas señales, como una conexión a Internet. Si el operador del avión y la legislación o normativa aplicable lo permiten, podrá utilizar el iPad y las apps que no necesiten estas señales. Si hay una conexión Wi-Fi disponible y el operador del avión y la legislación o normativa aplicable lo permite, vaya a Ajustes > Wi-Fi para activarla. También puede activar Bluetooth en Ajustes > Bluetooth. Wi-Fi Conexión a una red Wi-Fi Los ajustes Wi-Fi determinan cuándo el iPad utiliza redes Wi-Fi locales para conectarse a Internet. Cuando el iPad está conectado a una red Wi-Fi, el icono Wi-Fi situado en la barra de estado de la parte superior de la pantalla muestra la intensidad de la señal. Cuantas más barras haya, más intensa será la señal. Una vez que se conecte a una red Wi-Fi, el iPad se conectará automáticamente a ella siempre que esté en su radio de alcance. Si hay más de una red anteriormente utilizada dentro del radio de alcance, el iPad se conectará a la última empleada. También puede utilizar el iPad para configurar una nueva estación base AirPort que proporcione servicios Wi-Fi a su hogar u oficina. Consulte Configuración de una estación base AirPort en la página 118. AjustesCapítulo 27 Ajustes 118 Activar y desactivar la función Wi-Fi: Vaya a Ajustes > Wi-Fi. Puede: • Ajustar el iPad para que le pregunte si desea conectarse a una red nueva: Active o desactive “Preguntar al conectar”. Si la opción “Preguntar al conectar” está desactivada, deberá acceder manualmente a una red para conectarse a Internet cuando no esté disponible ninguna red utilizada previamente. • Omitir una red para que el iPad no se conecte: Pulse junto a una red a la que se haya conectado anteriormente. A continuación, pulse “Omitir esta red”. • Conectarse a una red Wi-Fi cerrada: En la lista de nombres de red, pulse Otras e introduzca el nombre de la red cerrada. Debe conocer de antemano el nombre, contraseña y tipo de seguridad de la red para conectarse a una red cerrada. • Configurar los ajustes para conectarse a una red Wi-Fi: Pulse junto a una red. Puede ajustar un proxy HTTP, definir ajustes de red estática, activar BootP o renovar los ajustes proporcionados por un servidor DHCP. Configuración de una estación base AirPort Una estación base AirPort proporciona una conexión Wi-Fi a la red de su hogar, escuela o pequeña empresa. Puede utilizar el iPad para configurar una nueva estación base AirPort Express, AirPort Extreme o Time Capsule. Utilizar el Asistente Configuración AirPort: Vaya a Ajustes > Wi-Fi. Bajo “Configurar una estación base AirPort”, pulse el nombre de la estación base que desee configurar. A continuación, siga las instrucciones que aparecen en pantalla. Si la estación base que desea configurar no aparece en la lista, asegúrese de que esté recibiendo alimentación, de que se encuentre dentro del radio de alcance y de que aún no se haya configurado. Solo podrá configurar estaciones base que sean nuevas o que se hayan restaurado. Algunos modelos antiguos de estaciones base AirPort no pueden configurarse utilizando un dispositivo iOS. Para ver las instrucciones de configuración, consulte la documentación que acompañaba a la estación base. Gestionar una red AirPort: Si el iPad está conectado a una estación base de AirPort, pulse junto al nombre de la red. Si no ha descargado todavía la Utilidad AirPort, se abrirá la tienda App Store para obtenerla. VPN Su organización puede utilizar una VPN para comunicar información privada de forma segura a través de una red no privada. Por ejemplo, puede necesitar configurar una VPN para acceder al correo electrónico de su trabajo. Este ajuste aparece cuando se ha configurado una red privada virtual o VPN en el iPad y le permite activarla o desactivarla. Consulte VPN en la página 122. Compartir Internet Puede usar Compartir Internet (en los modelos Wi-Fi + cellular) para compartir una conexión a Internet con un ordenador u otro dispositivo (como un iPod touch o un iPhone) conectado a su iPad a través de Wi-Fi. También puede usar Compartir Internet para compartir una conexión a Internet con un ordenador conectado al iPad a través de Bluetooth o USB. Compartir Internet solo funcionará si el iPad está conectado a Internet a través de una red de datos de telefonía móvil.Capítulo 27 Ajustes 119 Nota: Puede que esta función no esté disponible en todas las áreas. Pueden aplicarse tarifas adicionales. Póngase en contacto con su operador de telefonía para obtener más información al respecto. Compartir una conexión a Internet: Vaya a Ajustes > General > “Datos móviles” y, a continuación, pulse “Configurar Compartir Internet” (si aparece) para configurar el servicio con su operador. Después de activar Compartir Internet, otros dispositivos podrán conectarse de las siguientes formas: • Wi-Fi: En el dispositivo, seleccione su iPad en la lista de redes Wi-Fi disponibles. • USB: Conecte el iPad al ordenador mediante el cable incluido. En el panel de preferencias Red de su ordenador, seleccione iPad y configure los ajustes de red. • Bluetooth: En el iPad, vaya a Ajustes > Bluetooth y active Bluetooth. Para enlazar y conectar el iPad a su dispositivo, consulte la documentación que acompañaba al ordenador. Cuando haya un dispositivo conectado, en la parte superior de la pantalla del iPad aparecerá una banda de color azul. Compartir Internet permanecerá activado cuando se conecte mediante USB, aunque no esté utilizando de forma activa la conexión a Internet. Nota: El icono de Compartir Internet se muestra en la barra de estado de los dispositivos iOS que usan la función Compartir Internet. Cambiar la contraseña Wi-Fi del iPad: Vaya a Ajustes > Compartir Internet > “Contraseña Wi-Fi” e introduzca una contraseña de al menos 8 caracteres. Supervisar el uso de la red de datos de telefonía móvil: Vaya a Ajustes > General > Uso > “Uso de la red móvil”. Bluetooth El iPad puede conectarse de forma inalámbrica a dispositivos Bluetooth, como dispositivos manos libres, auriculares y kits de coche, para poder escuchar música y hablar sin necesidad de emplear las manos. También puede conectar el teclado inalámbrico de Apple con Bluetooth. Consulte Teclado inalámbrico de Apple en la página 28. Activar o desactivar Bluetooth: Vaya a Ajustes > Bluetooth. Conectarse a un dispositivo Bluetooth: Pulse el dispositivo en la lista Dispositivos y siga las instrucciones que aparecen en la pantalla para conectarse al mismo. Consulte la documentación del dispositivo para obtener información sobre cómo establecer enlaces Bluetooth. Datos móviles Use los ajustes de datos de telefonía móvil en el iPad(en los modelos Wi-Fi + cellular) para activar el servicio de datos de telefonía móvil, activar o desactivar el uso de datos de telefonía móvil o añadir un número de identificación personal (PIN) para bloquear la tarjeta SIM. Algunos operadores permiten, además, cambiar el plan de datos. Activar o desactivar los datos de telefonía móvil: Vaya a Ajustes > “Datos móviles”. Si los datos de telefonía móvil están desactivados, todos los servicios de datos utilizarán únicamente la conexión Wi-Fi, incluidos los servicios de correo electrónico, navegación web, notificaciones “push” y otros. Si los datos de telefonía móvil están activados, el operador puede cobrar el coste del servicio. Por ejemplo, el uso de algunas funciones y servicios, como la transferencia de datos a través de Mensajes, puede repercutir en costes en su plan de datos.Capítulo 27 Ajustes 120 Activar o desactivar LTE: Vaya a Ajustes > “Datos móviles”. Si la opción LTE está disponible, los datos se cargarán más rápido si la activa. Activar o desactivar la itinerancia de datos: Vaya a Ajustes > “Datos móviles”. La desactivación de la itinerancia de datos evita la aplicación de tarifas por parte del operador como consecuencia del uso de una red de otro operador. Configurar “Compartir Internet”: Vaya a Ajustes > “Datos móviles” > “Configurar Compartir Internet”. La función “Compartir Internet” comparte la conexión a Internet del iPad con su ordenador y otros dispositivos iOS. Consulte Compartir Internet en la página 118. Configurar cuándo se utilizan datos móviles: Vaya a Ajustes > “Datos móviles”, active o desactive los datos móviles para los documentos de iCloud, iTunes, FaceTime o la lista de lectura. Si estos ajustes están desactivados, el iPad solo utilizará la red Wi-Fi. iTunes incluye iTunes Match y descargas automáticas de iTunes Store y App Store. Activar, ver o cambiar su cuenta de datos de telefonía móvil: Vaya a Ajustes > “Datos móviles” y, a continuación, pulse “Ver cuenta”. Siga las instrucciones que aparecen en pantalla. Bloquear la SIM: Vaya a Ajustes > “Datos móviles” > “PIN de la SIM”. Si bloquea la SIM, necesitará el PIN para utilizar la conexión de datos móviles del iPad. “No molestar” y notificaciones Las notificaciones “push” aparecen en el centro de notificaciones y le alertan de novedades, aunque una app asociada no se esté ejecutando. Estas notificaciones varían con cada app, aunque pueden incluir alertas de texto o sonido, así como un globo con un número en el icono de la app en la pantalla de inicio. Desactivar todas las notificaciones: Vaya a Ajustes y active el modo “No molestar”. Cuando esta opción está activada y el iPad está bloqueado, todas las notificaciones se silencian, aunque las alarmas seguirán sonando. Puede ajustar las siguientes opciones en Ajustes > Notificaciones > No molestar: • Activar automáticamente “No molestar”: Ajuste la hora de comienzo y finalización del período donde no quiere que se le moleste. El iPad activará automáticamente “No molestar” durante estas horas todos los días. • Permitir algunas llamadas de FaceTime durante “No molestar”: Cuando “No molestar” está activado, las llamadas de FaceTime se silencian. Para permitir la recepción de algunas llamadas, pulse “Permitir llamadas de”. Puede permitir llamadas de su lista de Favoritos o de otros grupos de Contactos que usted defina. Para obtener información sobre Favoritos, consulte Capítulo 14, Contactos, en la página 73. • Permitir llamadas insistentes: Active “Llamadas repetidas”. Si el mismo comunicante (definido por su ID de FaceTime) llama dos veces en menos de tres minutos, el iPad hará sonar la llamada. Activar o desactivar las notificaciones de apps: Vaya a Ajustes > Notificaciones. Pulse un ítem de la lista y active o desactive las notificaciones para dicho ítem. Las apps que tienen desactivadas las notificaciones aparecen en la lista “Fuera del centro de notificaciones”. Cambiar la forma en que aparecen las notificaciones: Vaya a Ajustes > Notificaciones. Puede: • Cambiar el número de notificaciones: Seleccione un ítem de la lista “En el centro de notificaciones”. Para ajustar cuántas notificaciones de este tipo deben aparecer en el centro de notificaciones, pulse Mostrar. • Cambiar los estilos de alerta: Seleccione un ítem de la lista “En el centro de notificaciones”. Seleccione un estilo de alerta o seleccione Ninguna para desactivar las alertas y las tiras. Las notificaciones seguirán apareciendo en el centro de notificaciones.Capítulo 27 Ajustes 121 • Cambiar el orden de las notificaciones: Pulse Editar. Arrastre las notificaciones en el orden que desee. Para desactivar una notificación, arrástrela a la lista “Fuera del centro de notificaciones”. • Mostrar globos con números en las apps con notificaciones: Seleccione un ítem en la lista “En el centro de notificaciones” y active “Globos en los iconos”. • Ocultar las alertas de una app cuando el iPad esté bloqueado: Seleccione la app en la lista del centro de notificaciones y, a continuación, desactive “Ver en la pantalla bloqueada”. Algunas apps incluyen opciones adicionales. Por ejemplo, Mensajes le permite especificar cuántas veces debe repetirse el sonido de alerta y si deben incluirse previsualizaciones del mensaje en la notificación. Eliminar publicación y tuit del centro de notificaciones: Estas opciones de compartir aparecen solo si ha configurado cuentas de Facebook o Twitter. Para eliminar estos botones, vaya a Ajustes > Notificaciones y, después, desactive el Widget Compartir. General Los ajustes generales incluyen la configuración de red, el uso compartido, la seguridad y otros ajustes. En este panel de ajustes también puede encontrar información sobre su iPad y restablecer varios de los ajustes. Acerca de Mostrar información acerca del iPad: Vaya a Ajustes > General > Acerca de. Entre los ítems que puede ver están: • el espacio de almacenamiento disponible; • número de serie; • versión de iOS; • direcciones de red; • Número de datos móviles (en modelos Wi-Fi + cellular) • el código IMEI (identidad internacional de equipo móvil) en los modelos Wi-Fi + cellular • el número ICCID (identificador de tarjeta de circuito integrado o tarjeta inteligente) para redes GSM (en los modelos Wi-Fi + cellular) • el número MEID (identificador de equipos móviles) para redes CDMA (en los modelos Wi-Fi + cellular) • avisos legales, licencia y marcas sobre normativas. Para copiar el número de serie y otros identificadores, mantenga pulsado el identificador hasta que aparezca Copiar. Cambiar el nombre del dispositivo: Vaya a Ajustes > General > Información y, a continuación, pulse Nombre. El nombre del dispositivo aparecerá en la barra lateral cuando se conecte a iTunes y lo utilice iCloud. Para ayudar a Apple a mejorar sus productos y servicios, el iPad envía automáticamente datos de diagnóstico y uso. Estos datos no lo identifican personalmente, pero pueden incluir información de localización. Ver o desactivar la información de diagnóstico: Vaya a Ajustes > General > Acerca de > Diagnóstico y uso.Capítulo 27 Ajustes 122 Actualización de Software Actualización de Software le permite descargar e instalar actualizaciones de iOS desde Apple. Actualizar a la última versión de iOS: Vaya a Ajustes > General > Actualización de Software. Si hay una nueva versión disponible de iOS, siga las instrucciones que aparecen en pantalla para descargarla e instalarla. Uso Ver la información de uso: Vaya a Ajustes > General > Uso. Puede: • ver el uso de datos móviles y restablecer las estadísticas (modelos Wi-Fi + cellular) • ver y eliminar copias de seguridad de iCloud, desactivar la realización de copias de seguridad del Carrete y adquirir almacenamiento adicional • ver el almacenamiento de cada app • mostrar el nivel de batería como un porcentaje • ver el tiempo transcurrido desde que se ha cargado el iPad Siri Activar Siri: Vaya a Ajustes > General > Siri. Para obtener información acerca del uso de Siri y la modificación de sus ajustes, consulte Cómo ajustar las opciones de Siri en la página 42. VPN Las VPN se utilizan en empresas para poder comunicar información privada de forma segura a través de una red no privada. Por ejemplo, puede necesitar configurar una VPN para acceder al correo electrónico de su trabajo. Solicite al administrador de la red los ajustes necesarios para configurar VPN en su red. Una vez definidos uno o más ajustes de VPN, podrá: • Activar o desactivar VPN: Vaya a Ajustes > VPN. • Cambiar entre VPN: Vaya a Ajustes > General > VPN y, a continuación, seleccione una configuración. Sincronización con iTunes vía Wi-Fi Puede sincronizar el iPad con iTunes en un ordenador que esté conectado a la misma red Wi-Fi. Activar “Sincr. con iTunes vía Wi-Fi”: Para configurar la sincronización Wi-Fi por primera vez, conecte el iPad al ordenador con el que desee realizar la sincronización. Para obtener instrucciones al respecto, consulte Sincronización con iTunes en la página 18. Tras configurar la sincronización a través de Wi-Fi, el iPad se sincroniza automáticamente con iTunes una vez al día, cuando: • se conecte el iPad a una fuente de alimentación; • el iPad y el ordenador se conecten a la misma red Wi-Fi; • iTunes se esté ejecutando en su ordenador. Búsqueda en Spotlight El ajuste “Búsqueda en Spotlight” le permite especificar las áreas de contenido en las que deben realizarse las búsquedas con Buscar, así como reordenar los resultados. Establecer las áreas de contenido en las que se realizarán las búsquedas con Buscar: Vaya a Ajustes > General > “Búsqueda en Spotlight” y, a continuación, seleccione los ítems que desee buscar. También puede cambiar el orden de las categorías de resultados.Capítulo 27 Ajustes 123 Bloqueo automático Bloquear el iPad apaga la pantalla para ahorrar batería y evitar un uso no deseado del iPad. Podrá seguir recibiendo mensajes, así como ajustar el volumen y utilizar los botones del micrófono de sus auriculares mientras escucha música. Ajustar el tiempo que transcurre antes de que el iPad se bloquea: Vaya a Ajustes > General > “Bloqueo automático” y, a continuación, seleccione un periodo de tiempo. Bloqueo con código Por omisión, el iPad no requiere que se introduzca un código para desbloquearlo. Establecer un código: Vaya a Ajustes > General > “Bloqueo con código” y, después, establezca un código de 4 dígitos. Para aumentar la seguridad, desactive “Código simple” y utilice un código más largo. Si olvida el código, deberá restablecer el software del iPad. Consulte Actualización y restauración del software del iPad en la página 140. Permitir el acceso cuando el iPad está bloqueado: Vaya a Ajustes > General > Bloqueo con código. Puede utilizar Siri sin desbloquear el iPad. Consulte Cómo ajustar las opciones de Siri en la página 42. Borrar los datos después de introducir un código equivocado diez veces: Vaya a Ajustes > General > “Bloqueo con código” y, después, pulse “Borrar datos”. Después de introducir un código equivocado diez veces, se restablecerán todos los ajustes y se borrarán todos los datos y contenidos eliminando la clave de encriptación de los datos (que están encriptados mediante el sistema de encriptación AES de 256 bits). Bloqueo y desbloqueo mediante tapa El iPad se puede bloquear y desbloquear automáticamente con las fundas Smart Cover para el iPad y Smart Case para el iPad (a la venta por separado). Si esta función está activada, el iPad se bloqueará y entrará en modo de reposo automáticamente cuando cierre la tapa y se activará cuando la abra. Este ajuste aparece al acoplar las fundas Smart Cover y Smart Case para el iPad. Restricciones Puede fijar restricciones para determinadas apps y contenido comprado. Por ejemplo, los padres pueden evitar que la música con letras para adultos aparezca en las listas de reproducción, o impedir la instalación de apps. Activar las restricciones: Vaya a Ajustes > General > Restricciones y pulse “Activar restricciones”. Se le pedirá que defina un código de restricciones que será necesario para cambiar los ajustes realizados. Este será diferente del código para desbloquear el iPad. Importante: Si olvida el código de restricciones, deberá restablecer el software del iPad. Consulte Actualización y restauración del software del iPad en la página 140. Puede establecer restricciones para las siguientes apps: • Safari • Cámara (y las apps que utilicen la cámara) • FaceTime • La tienda iTunes Store • iBookstore • Siri Capítulo 27 Ajustes 124 Puede restringir también lo siguiente: • Instalar apps: La App Store está desactivada y su icono no aparece en la pantalla de inicio. No es posible instalar apps en el iPad. • Eliminar apps: No es posible eliminar apps del iPad. no aparece en los iconos de las apps al personalizar la pantalla de inicio. • Lenguaje explícito: Siri intentará sustituir las palabras de contenido explícito que diga por asteriscos o pitidos. • Privacidad: Pueden bloquearse de forma independiente los ajustes de privacidad para los servicios de localización, Contactos, Calendarios, Recordatorios, Fotos, Compartir Bluetooth, Twitter y Facebook. • Cuentas: Los ajustes actuales de “Correo, contactos, calendarios” están bloqueados. No es posible añadir, modificar ni eliminar cuentas. Tampoco es posible modificar los ajustes de iCloud. • Buscar a mis amigos: Los ajustes actuales de “Buscar a mis amigos” están bloqueados. Esta opción está disponible cuando se instala la app “Buscar a mis amigos”. • Límite de volumen: El ajuste actual del límite de volumen está bloqueado. • Compras integradas: Si está desactivada la opción “Compras integradas”, no podrá adquirir contenido o funciones adicionales de las apps que descargue desde la tienda App Store. • Solicitar contraseñas: Le solicita que introduzca su ID de Apple para las compras integradas una vez transcurrido el periodo de tiempo que especifique. • Restricciones de contenido: Pulse “Puntuaciones para” y, a continuación, seleccione un país de la lista. A continuación, ajuste restricciones para música y podcasts, libros, películas, programas de TV y apps. El contenido que no se ajuste a la puntuación seleccionada no se mostrará en el iPad. • Juegos multijugador: Si la opción “Juegos multijugador” está desactivada, no podrá solicitar partidas, enviar o recibir invitaciones para jugar ni añadir amigos a Game Center. • Añadir amigos: Si la opción “Añadir amigos” está desactivada, no podrá enviar ni recibir solicitudes de amistad en Game Center. Si está activada la opción “Juegos multijugador”, podrá seguir jugando con sus amigos existentes. Interruptor lateral Puede utilizar el interruptor lateral para bloquear la orientación de la pantalla o para silenciar los efectos de sonido y las notificaciones. Bloquear la pantalla en orientación vertical u horizontal: Vaya a Ajustes > General > “Usar interruptor lateral para…” y, a continuación, pulse “Bloquear rotación”. Silenciar las notificaciones y otros efectos de sonido: Vaya a Ajustes > General > “Usar interruptor lateral para…” y, a continuación, pulse Silenciar. El interruptor lateral no silencia la reproducción de audio o vídeo. Utilice los botones de volumen laterales para silenciar estos sonidos. Gestos para multitarea Los gestos para multitarea le permiten cambiar rápidamente de una app a otra, mostrar la barra multitarea e ir a la pantalla de inicio. Consulte Gestos para multitarea en la página 22. Fecha y hora Estos ajustes afectan a la hora indicada en la barra de estado de la parte superior de la pantalla, a los relojes internacionales y a los calendarios. Indicar si el iPad mostrará la hora en formato de 24 o 12 horas: Vaya a Ajustes > General > “Fecha y hora” y, a continuación, active o desactive “Reloj de 24 horas”. (Es posible que la opción “Reloj de 24 horas” no esté disponible en todas las áreas.) Capítulo 27 Ajustes 125 Establecer si el iPad actualiza la fecha y la hora automáticamente: Vaya a Ajustes > General > “Fecha y hora” y, a continuación, active o desactive “Ajuste automático”. Si ajusta el iPad de modo que actualice la hora automáticamente, obtendrá la hora correcta según su conexión de datos móviles (en los modelos Wi-Fi + cellular) o su conexión Wi-Fi. En algunos casos, el iPad puede no ser capaz de determinar automáticamente la hora local. Ajustar la fecha y la hora de forma manual: Vaya a Ajustes > General > “Fecha y hora” y, a continuación, desactive “Ajuste automático”. Pulse “Zona horaria” para ajustar su zona horaria. Pulse el botón “Fecha y hora” y luego pulse “Ajustar fecha y hora”. Teclado Puede activar teclados para escribir en distintos idiomas, y puede activar y desactivar distintas funciones de escritura, como la comprobación ortográfica. Para obtener información sobre las opciones de teclado, consulte Escritura en la página 25. Para obtener información sobre el uso de teclados internacionales, consulte Apéndice B, Teclados internacionales, en la página 130. Internacional Vaya a Ajustes > General > Internacional para ajustar lo siguiente: • El idioma del iPad • El formato del calendario • Los teclados que utiliza • Los formatos de fecha, hora y números Accesibilidad Vaya a Ajustes > General > Accesibilidad y active las funciones que desee. Consulte Capítulo 26, Accesibilidad, en la página 103. Perfiles Este ajuste aparecerá si instala uno o varios perfiles en el iPad. Pulse Perfiles para ver la información sobre los perfiles instalados. Para obtener más información sobre los perfiles, consulte Apéndice A, El iPad en la empresa, en la página 128. Restablecer Puede restablecer el diccionario de teclado, los ajustes de red, la disposición de la pantalla de inicio y los avisos de localización. También puede borrar todo su contenido y ajustes. Restablecer el iPad: Vaya a Ajustes > General > Restablecer y, a continuación, seleccione una opción: • Restablecer todos los ajustes: Todas sus preferencias y ajustes se restablecerán. • Borrar todo el contenido y los ajustes: Se eliminará su información y sus ajustes. No se podrá utilizar el iPad hasta que vuelva a configurarse. • Restablecer los ajustes de red: Cuando restablezca los ajustes de red, se eliminarán la lista de redes utilizadas previamente y los ajustes VPN no instalados por un perfil de configuración. El sistema Wi-Fi se desactivará y se volverá a activar, con lo que se desconectará de cualquier red a la que esté conectado. Los ajustes “Wi-Fi” y “Preguntar al conectar” permanecen activados. Para eliminar ajustes VPN instalados por un perfil de configuración, vaya a Ajustes > General > Perfil y, a continuación, seleccione el perfil y pulse Eliminar. Esta operación también elimina otros ajustes o cuentas proporcionados por el perfil.Capítulo 27 Ajustes 126 • Restablecer el diccionario del teclado: Puede añadir palabras al diccionario rechazando las palabras que el iPad sugiere al escribir. Restablecer el diccionario del teclado borra todas las palabras que ha añadido. • Restablecer la disposición de la pantalla de inicio: Devuelve las aplicaciones integradas a su disposición original en la pantalla de inicio. • Restablecer localización y privacidad: Restablece los servicios de localización y los ajustes de privacidad a sus valores de fábrica. Sonidos Puede ajustar el iPad para que reproduzca un sonido siempre que reciba un mensaje de texto, un mensaje de correo electrónico, un tuit, una publicación de Facebook, un mensaje en el buzón de voz o un recordatorio. También pueden establecer sonidos para citas, envío de mensajes de correo electrónico, clics del teclado y cuando bloquee el iPad. Cambiar los ajustes de sonido: Vaya a Ajustes > Sonidos. Entre las opciones disponibles están las siguientes: • Modificar el volumen de los tonos y alertas. • Establecer alertas y otros tonos. • Activar el clic del teclado y un sonido que se reproduce cuando el iPad se bloquea. Brillo y fondo de pantalla El brillo de la pantalla afecta a la duración de la batería. Oscurezca la pantalla para aumentar el tiempo que transcurrirá antes de que necesite recargar el iPad o utilice la función “Brillo automático”. Ajustar el brillo de la pantalla: Vaya a Ajustes > Brillo y, a continuación, arrastre el regulador. Si “Brillo automático” está activado, el iPad ajusta el brillo de la pantalla según las condiciones de iluminación de cada momento utilizando el sensor de luz ambiental integrado. Los ajustes de “Fondo de pantalla” le permiten establecer una imagen o foto como fondo de pantalla de la pantalla de bloqueo o de la pantalla de inicio. Consulte Modificación del fondo de pantalla en la página 24. Marco de fotos La modalidad de marco de fotos convierte el iPad en un auténtico marco de fotos digital. Seleccione la transición que desea utilizar, la duración de cada foto y el álbum que se mostrará. Elija si desea hacer un zoom en las caras o si desea reproducir las fotos en orden aleatorio. Iniciar la modalidad de marco de fotos: Pulse en la pantalla de bloqueo. Quitar el botón “Marco de fotos” de la pantalla de bloqueo: Vaya a Ajustes > General > Bloqueo con código.Capítulo 27 Ajustes 127 Privacidad Los ajustes de privacidad le permiten ver y controlar qué apps y servicios del sistema tienen acceso a los servicios de localización y a los contactos, calendarios, recordatorios y fotos. La función Localización permite que apps como Recordatorios, Mapas y Cámara basadas en información de localización obtengan y empleen información relativa a su ubicación geográfica. Su posición aproximada se determina empleando la información disponible en las redes de datos de telefonía móvil (en los modelos Wi-Fi + cellular), las redes Wi-Fi locales (si Wi-Fi está activado) y el sistema GPS (puede que no esté disponible en todas las áreas). Los datos de ubicación recopilados por Apple se obtienen de un modo que no permite identificarle de forma personal. Si una app está usando los servicios de localización, aparecerá en la barra de menús. Activar o desactivar los servicios de localización: Vaya a Ajustes > Privacidad > Localización. Puede desactivarlos para todas las apps y servicios que desee. Si desactiva los servicios de localización, el sistema le pedirá que vuelva a activarlos la próxima vez que una app o un servicio intente utilizarlos. Desactivar los servicios de localización para los servicios del sistema: Varios servicios del sistema, como iAds, utilizan información de localización. Para consultar su estado, activarlos, desactivarlos o mostrar en la barra de menú cuando estos servicios utilicen su localización, vaya a Ajustes > Privacidad > Servicios de localización > Servicios del sistema. Desactivar el acceso a información privada: Vaya a Ajustes > Privacidad. Puede ver qué apps han solicitado y recibido permiso para acceder a la siguiente información: • Contactos • Calendarios • Recordatorios • Fotos • Compartir Bluetooth • Twitter • Facebook Puede desactivar el acceso de cada app a cada una de las categorías de información. Revise los términos y la política de privacidad de cada app de otros fabricantes para comprender cómo utilizan los datos solicitados.A 128 El iPad en la empresa Gracias a su compatibilidad con accesos protegidos a redes, directorios y servidores Microsoft Exchange de empresa, el iPad está preparado para ir a trabajar. Para obtener información detallada acerca de la forma de usar el iPad para sus actividades empresariales, vaya a www.apple.com/es/ipad/business. Uso de perfiles de configuración Si se encuentra en un entorno empresarial, puede configurar cuentas y otros ítems en el iPad instalando un perfil de configuración. Los perfiles de configuración permiten a su administrador configurar su iPad para que pueda utilizar los sistemas de información de su empresa, escuela u organización. Por ejemplo, un perfil de configuración podría configurar el iPad para acceder a servidores Microsoft Exchange del trabajo, de modo que el iPad pueda acceder al correo electró- nico, los calendarios y los contactos de Exchange y pueda activar el “Bloqueo con código” para mantener la seguridad de la información. El administrador del sistema puede distribuir los perfiles de configuración por correo electrónico, colocándolos en una página web segura o instalándolos directamente en su iPad. Es posible que su administrador tenga que instalar un perfil que vincule el iPad a un servidor de gestión de dispositivos móviles, que permite a su administrador configurar sus ajustes de forma remota. Instalar perfiles de configuración: En el iPad, abra el mensaje de correo electrónico o descargue los perfiles de configuración desde el sitio web que le proporcione su administrador. Cuando abra un perfil de configuración, comenzará la instalación. Importante: Puede que el sistema le pregunte si un perfil de configuración es de confianza. En caso de duda, pregunte a su administrador antes de instalar el perfil de configuración. No puede cambiar la configuración definida por un perfil de configuración. Si quiere cambiarla, primero deberá eliminar el perfil de configuración o instalar uno nuevo con una nueva configuración. Eliminar un perfil de configuración: Vaya a Ajustes > General > Perfil, seleccione el perfil de configuración y luego pulse Eliminar. Al eliminar un perfil de configuración, se elimina la configuración y el resto de información que ha instalado el perfil. Configuración de cuentas de Microsoft Exchange Microsoft Exchange proporciona correo electrónico, así como información de contactos, tareas y calendarios, que puede sincronizar de forma automática e inalámbrica con el iPad. Puede configurar una cuenta Exchange directamente en el iPad. Configurar una cuenta Exchange en el iPad: Vaya a Ajustes > Correo, contactos, calendarios. Pulse “Añadir cuenta” y después, Microsoft Exchange. Pregunte a su proveedor de servicios o a su administrador qué configuración debe utilizar. El iPad en la empresa ApéndiceApéndice A El iPad en la empresa 129 Acceso a una red VPN Las redes privadas virtuales (VPN) ofrecen un acceso seguro por Internet a las redes privadas, por ejemplo, a la red de su empresa o institución académica. Utilice los ajustes de red del iPad para configurar y activar la red VPN. Consulte al administrador qué ajustes debe utilizar. También es posible configurar una VPN de forma automática mediante un perfil de configuración. Cuando la VPN se configura mediante un perfil de configuración, el iPad puede activar la VPN automáticamente cuando sea necesario. Para obtener más información al respecto, póngase en contacto con su administrador. Cuentas LDAP y CardDAV Si crea una cuenta LDAP, podrá ver y buscar contactos en el servidor LDAP de su empresa. El servidor aparecerá como un nuevo grupo dentro de Contactos. Como los contactos LDAP no se descargan en el iPad, para visualizarlos deberá disponer de conexión a Internet. Consulte a su administrador los ajustes de cuenta y otros requisitos (como VPN). Al configurar una cuenta CardDAV, los contactos de su cuenta se sincronizan con el iPad de forma remota. También podrá buscar contactos en el servidor CardDAV de su empresa. Configurar una cuenta de LDAP o CardDAV: Vaya a Ajustes > “Correo, contactos, calendarios” y pulse “Añadir cuenta”. Pulse Otra. Pregunte a su proveedor de servicios o a su administrador qué configuración debe utilizar.B 130 Uso de teclados internacionales La función “Teclados internacionales” le permite escribir texto en muchos idiomas distintos, incluidos los idiomas asiáticos y los que se escriben de derecha a izquierda. Para consultar una lista de los teclados compatibles, vaya a www.apple.com/es/ipad/specs. Gestionar los teclados: Vaya a Ajustes > General > Internacional > Teclados. • Añadir un teclado: Pulse “Añadir nuevo teclado” y seleccione un teclado de la lista. Repita la operación para añadir más teclados. • Eliminar un teclado: Pulse Editar, pulse junto al teclado que desee eliminar y, a continuación, pulse Eliminar. • Editar su lista de teclados: Pulse Editar y, a continuación, arrastre junto a un teclado hasta una nueva posición en la lista. Para introducir texto en otro idioma, cambie de teclado. Cambiar de teclado mientras escribe: Mantenga pulsada la tecla de globo terráqueo para mostrar sus teclados activados. Para seleccionar un teclado, desplace el dedo hasta el nombre del teclado y, a continuación, suelte el dedo. La tecla de globo terráqueo se muestra solo si activa más de un teclado. También puede pulsar . Cuando pulse , aparecerá brevemente el nombre del teclado recién activado. Mantenga la pulsación para acceder a otros teclados activados. Muchos teclados incluyen letras, números y símbolos que no son visibles en el teclado. Introducir letras acentuadas u otros caracteres: Mantenga pulsada la letra, el número o el símbolo relacionado y, a continuación, deslice el dedo para seleccionar una variante. Por ejemplo: • En un teclado tailandés: Seleccione los números nativos manteniendo pulsado el número arábigo relacionado. • En los teclados chino, japonés o árabe: Los candidatos o caracteres sugeridos aparecerán en la parte superior del teclado. Pulse un candidato para introducirlo o desplácese a la izquierda para ver más candidatos. Utilizar la lista de candidatos ampliada: Pulse la flecha arriba situada a la derecha para ver la lista completa de candidatos. • Moverse por la lista: Desplácese hacia arriba o hacia abajo. • Volver a la lista rápida: Pulse la flecha hacia abajo. Cuando se usan determinados teclados chinos o japoneses, es posible crear una función rápida para parejas de palabras y entradas. La función rápida se añade a su diccionario personal. Al escribir una función rápida utilizando un teclado compatible, la palabra enlazada o entrada asociada sustituirá dicha función rápida. Teclados internacionales ApéndiceApéndice B Teclados internacionales 131 Activar o desactivar las funciones rápidas: Vaya a Ajustes > General > Teclado > Funciones rápidas. Existen funciones rápidas disponibles para: • Chino simplificado: pinyin • Chino tradicional: pinyin y zhuyin • Japonés: romaji y 50 teclas Métodos de entrada especiales Puede utilizar los teclados para escribir en algunos idiomas de diferentes maneras. Algunos ejemplos son el chino cangjie, el wubihua, el kana japonés y los emoticonos. También puede usar el dedo o un lápiz táctil para escribir caracteres chinos en la pantalla. Construir caracteres chinos a partir de las teclas cangjie de componentes: A medida que escriba, aparecerán sugerencias de caracteres. Pulse un carácter para seleccionarlo o continúe escribiendo hasta cinco componentes para ver más opciones. Construir caracteres chinos wubihua (trazos): Utilice el teclado para construir caracteres chinos a partir de un máximo de cinco trazos en la secuencia correcta de escritura: horizontal, vertical, cola, escoba y gancho. Por ejemplo, el carácter chino 圈 (círculo) debe comenzar con el trazo vertical 丨. • A medida que escribe, aparecen sugerencias de caracteres chinos (con los caracteres más utilizados en primer lugar). Pulse un carácter para seleccionarlo. • Si no está seguro del trazo correcto, escriba un asterisco (*). Para ver más opciones de caracteres, realice otro trazo o desplácese por la lista de caracteres. • Pulse la tecla de coincidencia (匹配) para mostrar solamente los caracteres que coincidan exactamente con lo que ha escrito. Escribir caracteres chinos: Escriba los caracteres chinos directamente en la pantalla con el dedo si se encuentran activados los formatos de escritura en chino tradicional o simplificado. A medida que realice trazos, el iPad los reconocerá y mostrará una lista de caracteres concordantes ordenados de mayor a menor concordancia. Cuando selecciona un carácter, los caracteres que le siguen con más probabilidad aparecerán en la lista como opciones adicionales. Pantalla táctil Pantalla táctil Algunos caracteres complejos, tales como 鱲 (parte del nombre del Aeropuerto Internacional de Hong Kong), 𨋢 (ascensor) y 㗎 (partícula utilizada en cantonés) pueden introducirse escribiendo dos o más caracteres componentes consecutivos. Pulse el carácter para sustituir los caracteres escritos. También se reconocen los caracteres romanos.Apéndice B Teclados internacionales 132 Escribir en japonés kana: Utilice el teclado kana para seleccionar sílabas. Para ver más opciones de sílabas, pulse la tecla de flecha y seleccione otra sílaba o palabra de la ventana. Escribir en japonés romaji: Use el teclado romaji para escribir sílabas: En la parte superior del teclado aparecen opciones alternativas; pulse una para escribirla. Para ver más opciones de sílabas, pulse la tecla de flecha y seleccione otra sílaba o palabra de la ventana. Introducir emoticonos japoneses: Utilice el teclado japonés kana y pulse la tecla ^_^. O bien puede: • utilizar el teclado japonés romaji (disposición QWERTY-japonés): pulse la tecla numérica y, a continuación, pulse la tecla ^_^. • Utilizar el teclado chino pinyin (simplificado o tradicional) o zhuyin (tradicional): Pulse la tecla Símbolo y, después, pulse la tecla ^_^.C 133 Información importante sobre seguridad ADVERTENCIA: No respetar estas instrucciones de seguridad podría provocar incendios, descargas eléctricas u otras lesiones, o bien dañar el iPad u otra propiedad. Lea toda la información de seguridad que se incluye a continuación antes de utilizar el iPad. Manejo Manipule el iPad con cuidado. Está fabricado en metal, vidrio y plástico e incorpora componentes electrónicos sensibles en su interior. Si se cae, se quema, se pincha, se aplasta o entra en contacto con líquidos, podría sufrir daños. No utilice un iPad que esté dañado (por ejemplo, si la pantalla está rajada), puesto que podría ocasionar lesiones. Si le preocupa que la superficie exterior se raye, considere el uso de una funda protectora. Reparación No abra el iPad ni trate de repararlo usted mismo. Desmontar el iPad podría provocarle lesiones o bien causar daños en el iPad. Si el iPad está dañado, funciona mal o entra en contacto con algún líquido, póngase en contacto con Apple o con un proveedor de servicios Apple autorizado. Puede encontrar más información sobre el modo de encargar reparaciones en www.apple.com/support/ipad/service/faq. Batería No trate de sustituir la batería del iPad, ya que podría dañarla y provocar un sobrecalentamiento y alguna lesión. La batería de iones de litio del iPad solo debe cambiarla Apple o un proveedor de servicios Apple autorizado, y debe reciclarse o eliminarse separadamente de la basura normal. No incinere la batería. Para obtener información sobre el reciclaje y sustitución de baterías, vaya a to www.apple.com/es/batteries, www.apple.com/mx/batteries o www.apple.com/la/batteries. Distracción Utilizar el iPad en ciertas circunstancias puede distraerle y generar situaciones peligrosas. Respete las normas que prohíben o restringen el uso de dispositivos móviles o auriculares (por ejemplo, no envíe mensajes de texto mientras conduce un coche, o no utilice auriculares mientras monta en bicicleta). Navegación Los mapas, las indicaciones, las vistas Flyover y las apps basadas en información de localización geográfica dependen de servicios de datos. Estos servicios de datos están sujetos a cambios y pueden no estar disponibles en todas las zonas, lo que puede dar como resultado mapas, indicaciones, vistas Flyover o datos de localización no disponibles, imprecisos o incompletos. Compare la información proporcionada por el iPad con sus alrededores, y emplee las señales a la vista para resolver cualquier discrepancia. Para poder utilizar algunas funciones de Mapas, es necesario tener activada la función de Localización. Consulte Privacidad en la página 127. Utilice el sentido común al navegar. Seguridad, manejo y soporte ApéndiceApéndice C Seguridad, manejo y soporte 134 Recarga Recargue el iPad con el cable USB y el adaptador de corriente incluidos o con cables o adaptadores de corriente de otros fabricantes que hayan recibido la certificación para utilizar el logotipo “Made for iPad” y que sean compatibles con USB 2.0. El uso de cables o cargadores dañados, o la recarga en ambientes húmedos, puede provocar descargas eléctricas. Cuando utilice el adaptador de corriente USB de Apple para cargar el iPad, asegúrese de que el conector o el cable de alimentación estén totalmente conectados al adaptador antes de enchufarlo en una toma de alimentación. Es normal que el adaptador de corriente USB de Apple se caliente durante la carga. El contacto prolongado puede provocar lesiones. Deje siempre un espacio de ventilación suficiente alrededor del adaptador de corriente. Pérdida de audición Escuchar sonidos a gran volumen puede ocasionar daños en el oído. El ruido de fondo, al igual que la exposición continuada a niveles de volumen elevados, puede hacer que los sonidos parezcan más bajos de lo que realmente son. Active el audio y compruebe el volumen antes de colocarse nada en el oído. Para obtener más información sobre la pérdida auditiva, consulte www.apple.com/es/sound. Para obtener más información sobre cómo establecer un límite máximo de volumen en el iPad, consulte Ajustes de Música en la página 88. ADVERTENCIA: Para evitar posibles pérdidas auditivas, no escuche a volúmenes elevados durante periodos prolongados. Auriculares Apple Los auriculares vendidos con el iPhone 4S o posterior en China (identificables por los anillos aislantes oscuros en el conector) están diseñados para cumplir con los estándares chinos y son compatibles con el iPhone 4S o posterior, el iPad 2 o posterior y el iPod touch de quinta generación. Utilice solo auriculares compatibles con su dispositivo. Señales de radio El iPad utiliza señales de radio para conectarse a redes inalámbricas. Para obtener información sobre la potencia empleada para transmitir estas señales y sobre los pasos que puede dar para minimizar la exposición, consulte Ajustes > General > Acerca de > Legal > Exposición RF. Interferencias de radiofrecuencia Obedezca las señales e indicaciones que prohíban o restrinjan el uso de dispositivos móviles (por ejemplo, en instalaciones sanitarias o zonas con riesgo de explosión). Aunque el iPad ha sido diseñado, probado y fabricado para cumplir la normativa vigente sobre emisiones de radiofrecuencias, dichas emisiones del iPad pueden afectar al funcionamiento de otros equipos electrónicos y hacer que no funcionen correctamente. Apague el iPad o utilice el modo Avión para desactivar los transmisores inalámbricos del iPad cuando su uso esté prohibido, por ejemplo, mientras viaje en avión o si las autoridades le solicitan que lo haga. Dispositivos médicos El iPad contiene radios que emiten campos electromagnéticos. Estos campos electromagnéticos pueden interferir con marcapasos y otros dispositivos médicos. Si lleva un marcapasos, deje unos 15 cm como mínimo de separación entre el marcapasos y el iPad. Si sospecha que el iPad está provocando interferencias con su marcapasos o con cualquier otro dispositivo médico, deje de usar el iPad y consulte a su médico para obtener información específica sobre su dispositivo médico. El iPad tiene imanes en el borde izquierdo del dispositivo y en el lado derecho del cristal frontal, que pueden interferir con marcapasos, desfibriladores u otros dispositivos médicos. La Smart Cover para el iPad y la Smart Case para el iPad también contienen imanes. Mantenga una distancia mínima de 15 cm entre su marcapasos o desfibrilador y el iPad, la Smart Cover para el iPad o la Smart Case para el iPad. Afecciones médicas Si tiene cualquier otra afección médica que cree que podría verse afectada por el uso del iPad (por ejemplo, convulsiones, desmayos, fatiga ocular o dolores de cabeza), consulte a su médico antes de utilizar el iPad. Apéndice C Seguridad, manejo y soporte 135 Atmósferas explosivas No cargue ni utilice el iPad en ninguna atmósfera potencialmente explosiva, como en zonas de repostaje de combustibles o en áreas en las que el aire contenga sustancias químicas o partículas (grano, polvo o metales pulverizados). Obedezca todas las señales e instrucciones. Movimiento repetitivo Si realiza actividades repetitivas como escribir o jugar con el iPad, podría experimentar molestias ocasionales en las manos, los brazos, las muñecas, los hombros, el cuello u otras partes del cuerpo. Si experimenta alguna molestia, deje de utilizar el iPad y consulte a un médico. Actividades de alto riesgo Este dispositivo no está destinado para usos en los que el fallo del dispositivo pueda provocar fallecimientos, lesiones personales o daños graves en el medio ambiente Riesgo de asfixia Algunos accesorios del iPad pueden plantear un riesgo de asfixia para los niños pequeños. Mantenga estos accesorios alejados de los niños pequeños. Información importante sobre manejo Limpieza Limpie el iPad de inmediato si entra en contacto con cualquier elemento que pueda mancharlo (polvo, tinta, maquillaje, lociones, etc.). Para limpiar: • Desconecte todos los cables y apague el iPad (mantenga pulsado el botón de reposo/activación y, a continuación, arrastre el regulador que aparece en pantalla). • Utilice un paño suave y que no desprenda pelusa. • Evite que entre humedad en las aberturas. • No utilice productos de limpieza ni tampoco aire comprimido. La parte delantera del iPad está hecha de vidrio con un revestimiento oleofóbico (que repele el aceite) resistente a huellas. Este revestimiento se desgasta con el uso normal. Los productos de limpieza y los materiales abrasivos mermarán aún más el revestimiento y podrían llegar a rayar el cristal. Los medios abrasivos también podrían rayar el iPad. Uso de conectores, puertos y botones No fuerce nunca la introducción de un conector en un puerto ni aplique una presión excesiva al pulsar un botón, ya que esto podría provocar daños no cubiertos por la garantía. Si el conector y el puerto no encajan con una facilidad razonable, es probable que no puedan conectarse. Compruebe que no haya ninguna obstrucción y asegúrese de que el conector se corresponda con el puerto y de haberlo colocado en la posición correcta con respecto al puerto. Lightning Es normal que el conector Lightning se decolore tras su uso habitual. La suciedad y la exposición a líquidos puede provocar su decoloración. Para eliminar esta decoloración o si el cable se calentase durante su uso o no cargase ni permitiese sincronizar el iPad, desconecte el cable Lightning del ordenador o el adaptador de corriente y límpielo con un trapo suave, seco y que no suelte pelusas. No utilice líquidos o productos de limpieza al limpiar el conector Lightning.Apéndice C Seguridad, manejo y soporte 136 Temperatura de funcionamiento El iPad ha sido diseñado para funcionar a temperaturas de entre 0 y 35 °C y puede guardarse a temperaturas de entre -20 y 45 °C. El iPad puede sufrir daños y la vida útil de la batería puede reducirse si se guarda o se utiliza fuera de estos intervalos de temperaturas. Procure no exponer el iPad a cambios drásticos de temperatura o humedad. Cuando esté usando el iPad o cargando la batería, es normal que el iPad se caliente. Si la temperatura interior del iPad excede el intervalo normal de funcionamiento (por ejemplo, si permanece dentro de un coche a altas temperaturas o expuesto a la luz directa del sol durante largos periodos de tiempo), puede notar los siguientes síntomas mientras el dispositivo trata de regular la temperatura: • El iPad deja de recargarse. • La pantalla se oscurece. • Aparece en pantalla una advertencia sobre la temperatura. • Algunas apps podrían cerrarse. Importante: Es posible que no pueda utilizar el iPad mientras se muestre la pantalla de advertencia sobre la temperatura. Si el iPad no puede regular su temperatura interna, entra en un modo de reposo profundo hasta que se enfría. Lleve el iPad a una ubicación más fría, lejos de la luz directa del sol, y espere unos minutos antes de intentar utilizar de nuevo el iPad. Para obtener más información, vaya a support.apple.com/kb/HT2101?viewlocale=es_ES. Soporte del iPad Dispone de un completo portal con información de soporte en Internet, en la dirección www.apple.com/es/support/ipad. Para ponerse en contacto con Apple a fin de obtener soporte personalizado (no disponible en todas las zonas), consulte www.apple.com/es/support/contact. Aparece una imagen de batería baja o el mensaje “No se está cargando” El nivel de carga de la batería del iPad es bajo y necesita recargarlo durante veinte minutos aproximadamente para poder utilizarlo. Para obtener información sobre la recarga del iPad, consulte Batería en la página 38. o bien o bien • Cuando vaya a cargar la batería del iPad, asegúrese de que utiliza el adaptador de corriente USB que venía con el iPad o un puerto USB de un modelo de Mac reciente. La forma más rápida de cargar la batería es utilizando el adaptador de corriente. Consulte Batería en la página 38. • Apague el iPad para que se recargue más rápidamente. • Es posible que el iPad no se recargue si se conecta al puerto USB de un modelo de Mac antiguo, un PC, un teclado o un hub USB. Si su Mac o PC no proporciona suficiente alimentación para recargar el iPad, en la barra de estado se mostrará el mensaje “No se está cargando”. Para recargar el iPad, desconéctelo del ordenador y conéctelo a una toma de corriente mediante el cable USB y el adaptador de corriente USB incluidos.Apéndice C Seguridad, manejo y soporte 137 El iPad no responde • Puede que el iPad tenga un nivel bajo de batería. Conecte el iPad al adaptador de corriente USB para recargarlo. Consulte Batería en la página 38. • Mantenga pulsado el botón de reposo/activación durante unos segundos hasta que aparezca un regulador rojo y, a continuación, mantenga pulsado el botón de inicio para forzar el cierre de la app que estaba utilizando. • Si esto no funciona, apague el iPad y, a continuación, vuelva a encenderlo. Mantenga pulsado el botón de reposo/activación hasta que aparezca un regulador rojo y entonces arrástrelo. A continuación, mantenga pulsado el botón de reposo/activación hasta que aparezca el logotipo de Apple. • Si esta solución no funciona, reinicie el iPad. Mantenga pulsado el botón de reposo/activación y el botón de inicio durante al menos diez segundos, hasta que aparezca el logotipo de Apple. • Si la pantalla no gira cuando gira el iPad, mantenga el iPad en posición vertical y asegúrese de que no se haya bloqueado la rotación de la pantalla. Reinicio y restauración del iPad Si hay algo que no funciona correctamente, pruebe a reiniciar el iPad, forzar la salida de una app o restablecer el iPad. Reiniciar el iPad: Mantenga pulsado el botón de reposo/activación hasta que aparezca el regulador rojo. Arrastre el regulador para apagar el iPad. Para volver a encender el iPad, mantenga pulsado el botón de reposo/activación hasta que aparezca el logotipo de Apple. Forzar el cierre de una app: Mantenga pulsado el botón de reposo/activación de la parte superior del iPad durante unos segundos hasta que aparezca un regulador rojo y, a continuación, mantenga pulsado el botón de inicio hasta que la app se cierre. Si no puede apagar el iPad o si el problema persiste, puede ser necesario restablecer el iPad. Solo deberá reinicializarlo si al apagar y encender el iPad no se resuelve el problema. Restablecer el iPad: Mantenga pulsado al mismo tiempo el botón de reposo/activación y el botón de inicio durante al menos diez segundos, hasta que aparezca el logotipo de Apple. Aparece “Código incorrecto” o “El iPad está deshabilitado” Si olvida el código o el iPad muestra una alerta que indica que está desactivado, consulte “iOS: Dispositivo deshabilitado después de introducir un código erróneo” en support.apple.com/kb/HT1212?viewlocale=es_ES. Aparece “Este accesorio no es compatible con el iPad” El accesorio conectado puede no funcionar con el iPad. Asegúrese de que el cable USB y los conectores estén libres de suciedad y consulte la documentación incluida con el accesorio. Una app no ocupa toda la pantalla La mayoría de las apps para iPhone y iPod touch pueden utilizarse con el iPad, pero es posible no puedan sacar partido del mayor tamaño de su pantalla. En este caso, pulse para aumentar el zoom de visualización de la app. Pulse para volver al tamaño original. Compruebe si hay una versión de la app en la tienda App Store que esté optimizada para usarse con el iPad o si hay una versión universal optimizada para iPhone, iPod touch y iPad.Apéndice C Seguridad, manejo y soporte 138 No aparece el teclado en pantalla Si el iPad está enlazado con un teclado Bluetooth, el teclado en pantalla no aparecerá. Para ver el teclado en pantalla, pulse la tecla de expulsión de un teclado Bluetooth. El teclado en pantalla también aparece al alejar el teclado Bluetooth del radio de alcance del dispositivo o al apagarlo. Realización de copias de seguridad del iPad Puede utilizar iCloud o iTunes para realizar copias de seguridad automáticas del iPad. Si selecciona que se realicen copias de seguridad automáticas con iCloud, no podrá utilizar también iTunes para realizar copias de seguridad automáticas de su ordenador, aunque puede utilizar iTunes para realizar copias de seguridad manuales de su ordenador. Cómo realizar copias de seguridad con iCloud iCloud realiza copias de seguridad automáticas del iPad a diario, a través de la conexión Wi-Fi, cuando se conecta a una fuente de alimentación y está bloqueado. La fecha y hora de la última copia de seguridad se muestra en la parte inferior de la pantalla “Almacenamiento y copias”. iCloud realiza copias de seguridad de: • La música, los programas de televisión, las apps y los libros que compra. • Las fotos y los vídeos del Carrete. • Los ajustes del iPad. • Los datos de las apps. • La organización de la pantalla de inicio y de las apps. • Mensajes Nota: Es posible que no se realicen copias de seguridad de la música comprada en todas las áreas, y que los programas de televisión no estén disponibles en todas las áreas. Si no activó las copias de seguridad de iCloud la primera vez que configuró el iPad, puede activarlas en los ajustes de iCloud. Al activar las copias de seguridad de iCloud, el iPad deja de realizar copias de seguridad automáticas de su ordenador cuando se sincroniza con iTunes. Activar las copias de seguridad de iCloud: Vaya a Ajustes > iCloud y, a continuación, inicie sesión con su ID de Apple y su contraseña, si es preciso. Vaya a “Almacenamiento y copias” y, a continuación, active “Copia de seguridad de iCloud”. Realizar una copia de seguridad de forma inmediata: Vaya a Ajustes > iCloud > “Almacenamiento y copias” y, a continuación, pulse “Realizar copia de seguridad ahora”. Gestionar sus copias de seguridad: Vaya a Ajustes > iCloud > “Almacenamiento y copias” y, a continuación, pulse “Gestionar almacenamiento”. Pulse el nombre de su iPad. Activar o desactivar copia de seguridad del Carrete: Vaya a Ajustes > iCloud > “Almacenamiento y copias” y, a continuación, pulse “Gestionar almacenamiento”. Pulse el nombre de su iPad y, a continuación, active o desactive la copia de seguridad del Carrete. Ver los dispositivos de los que se están realizando copias de seguridad: Vaya a Ajustes > iCloud > Almacenamiento y copias > “Gestionar almacenamiento”. Detener las copias de seguridad de iCloud: Vaya a Ajustes > iCloud > Almacenamiento y copias > “Copia de seguridad” y, a continuación, desactive “Copia de seguridad de iCloud”. No se realizarán copias de seguridad en iCloud de la música que no se haya adquirido en iTunes. Deberá utilizar iTunes para realizar copias de seguridad de dicho contenido y restaurarlo. Consulte Sincronización con iTunes en la página 18.Apéndice C Seguridad, manejo y soporte 139 Importante: Es posible que las copias de seguridad de compras de música o programas de televisión no estén disponibles en todas las áreas. Puede que sus compras anteriores no estén disponibles si ya no está en las tiendas iTunes Store, App Store o iBookstore. Los contenidos que compre, así como los contenidos de Fotos en Streaming, no se descontarán del sus 5 GB de almacenamiento gratuito en iCloud. Cómo realizar copias de seguridad con iTunes iTunes crea una copia de seguridad de las fotos del álbum Carrete o del álbum “Fotos guardadas”, así como de los mensajes de texto, notas, lista de favoritos, ajustes de sonido, etc. No se realizan copias de seguridad de los archivos multimedia, como canciones y algunas fotos, pero pueden restaurarse mediante una sincronización con iTunes. Cuando conecte el iPad al ordenador con el que normalmente realice la sincronización, iTunes creará una copia de seguridad cada vez que: • Realice una sincronización con iTunes: iTunes sincroniza el iPad cada vez que conecta el iPad a su ordenador. iTunes no realizará ninguna copia de seguridad automática de un iPad que no esté configurado para sincronizarse con dicho ordenador. Consulte Sincronización con iTunes en la página 18. • Actualice o restaure el iPad: iTunes realiza una copia de seguridad del iPad automáticamente antes de la actualización y de la restauración. iTunes también puede encriptar las copias de seguridad del iPad para proteger sus datos. Encripte las copias de seguridad del iPad: Seleccione “Encriptar copia de seguridad del iPad” en el panel Resumen de iTunes. Restaure los archivos y los ajustes del iPad: Conecte el iPad al ordenador con el que normalmente realice la sincronización, seleccione el iPad en la ventana de iTunes y haga clic en Restaurar en el panel Resumen. Para obtener más información sobre copias de seguridad, vaya a support.apple.com/kb/HT1766?viewlocale=es_ES. Cómo eliminar una copia de seguridad de iTunes Puede eliminar una copia de seguridad del iPad desde la lista de copias con iTunes. Puede interesarle, por ejemplo, si se ha creado una copia de seguridad en un ordenador ajeno. Eliminar una copia de seguridad: 1 En iTunes, abra las preferencias de iTunes. • Mac: Seleccione iTunes > Preferencias. • Windows: Seleccione Edición > Preferencias. 2 Haga clic en Dispositivos (el iPad no tiene por qué estar conectado). 3 Seleccione la copia de seguridad que desea eliminar y, a continuación, haga clic en “Eliminar copia de seguridad”. 4 Haga clic en Eliminar para confirmar que desea eliminar la copia seleccionada y, a continuación, haga clic en Aceptar.Apéndice C Seguridad, manejo y soporte 140 Actualización y restauración del software del iPad Puede actualizar el software del iPad en Ajustes o utilizando iTunes. También puede borrar el iPad y, a continuación, utilizar iCloud o iTunes para realizar una restauración a partir de una copia de seguridad. Ya no podrá acceder a los datos eliminados a través la interfaz de usuario del iPad, pero no se borrarán del iPad. Para obtener información sobre la eliminación de todos los contenidos y ajustes, consulte Restablecer en la página 125. Actualización del iPad Puede actualizar el software del iPad en Ajustes o utilizando iTunes. Realizar una actualización inalámbrica en el iPad: Vaya a Ajustes > General > Actualización de Software. El iPad comprobará si hay actualizaciones de software disponibles. Realizar una actualización de software en iTunes: iTunes comprueba si hay actualizaciones de software disponibles cada vez que sincroniza el iPad con iTunes. Consulte Sincronización con iTunes en la página 18. Para obtener más información sobre la actualización del software del iPad, vaya a support.apple.com/kb/HT4623?viewlocale=es_ES. Restauración del iPad Puede utilizar iCloud o iTunes para restaurar el iPad a partir de una copia de seguridad. Realizar una restauración a partir de una copia de seguridad de iCloud: Restablezca el iPad para borrar todos los ajustes y todos los datos. Inicie sesión en iCloud y seleccione “Restaurar a partir de una copia de seguridad” en el Asistente de Configuración. Consulte Restablecer en la página 125. Realizar una restauración a partir de una copia de seguridad de iTunes: Conecte el iPad al ordenador con el que normalmente realice la sincronización, seleccione el iPad en la ventana de iTunes y haga clic en Restaurar en el panel Resumen. Cuando se haya restaurado el software del iPad, podrá configurarlo como un nuevo iPad o bien restaurar su música, vídeos, datos de las apps y otros contenidos a partir de una copia de seguridad. Para obtener más información sobre la restauración del software del iPad, vaya a support.apple.com/kb/HT1414?viewlocale=es_ES. Envío, recepción o visualización de correos electrónicos Si el iPad no puede enviar ni recibir mensajes de correo electrónico o no permite visualizar adjuntos, pruebe los siguientes pasos. No se pueden enviar mensajes de correo electrónico • Apague el iPad y vuelva a encenderlo. Mantenga pulsado el botón de reposo/activación durante unos segundos hasta que aparezca un regulador rojo y entonces arrástrelo. A continuación, mantenga pulsado el botón de reposo/activación hasta que aparezca el logotipo de Apple. • En Ajustes, vaya a “Correo, contactos, calendarios” y, a continuación, seleccione la cuenta que esté intentando usar. Pulse “Datos de la cuenta” y, a continuación, pulse SMTP en “Servidor correo saliente”. Puede configurar otros servidores SMTP o seleccionar un servidor de otra cuenta de correo del iPad. Póngase en contacto con su proveedor de acceso a Internet para obtener los datos de configuración.Apéndice C Seguridad, manejo y soporte 141 • Configure su cuenta de correo directamente en el iPad en lugar de sincronizarla desde iTunes. Vaya a Ajustes > “Correo, contactos, calendarios”, pulse “Añadir cuenta” e introduzca los datos de su cuenta. support.apple.com/kb/HT4810?viewlocale=es_ESSi el iPad no logra localizar los ajustes de su proveedor de servicio al introducir su dirección de correo electrónico, vaya a support.apple.com/kb/HT4810?viewlocale=es_ES a fin de obtener ayuda para configurar su cuenta. Para obtener más información sobre solución de problemas, vaya a www.apple.com/es/support/ipad. No se pueden recibir mensajes de correo electrónico • Apague el iPad y vuelva a encenderlo. Mantenga pulsado el botón de reposo/activación durante unos segundos hasta que aparezca un regulador rojo y entonces arrástrelo. A continuación, mantenga pulsado el botón de reposo/activación hasta que aparezca el logotipo de Apple. • Si está utilizando uno o varios ordenadores para acceder a la misma cuenta de correo electrónico, es posible que se haya producido un bloqueo. Para obtener más información, vaya a support.apple.com/kb/TS2621?viewlocale=es_ES. • Configure su cuenta de correo electrónico directamente en el iPad en lugar de sincronizarla desde iTunes. Vaya a Ajustes > “Correo, contactos, calendarios”, pulse “Añadir cuenta” e introduzca los datos de su cuenta. support.apple.com/kb/HT4810?viewlocale=es_ESSi el iPad no logra localizar los ajustes de su proveedor de servicio al introducir su dirección de correo electrónico, vaya a support.apple.com/kb/HT4810?viewlocale=es_ES a fin de obtener ayuda para configurar su cuenta. • Si tiene un iPad Wi-Fi + cellular, desactive la red Wi-Fi para que el iPad se conecte a Internet a través de la red de datos de telefonía móvil. Vaya a Ajustes > Wi-Fi y, a continuación, desactive Wi-Fi. Para obtener más información sobre solución de problemas, vaya a www.apple.com/es/support/ipad. No se pueden ver adjuntos de correo electrónico • Ver un archivo adjunto: Pulse el archivo adjunto para abrirlo en Vista Rápida. Puede tener que esperar a que se descargue antes de verlo. • Guardar una foto o un vídeo adjunto: Pulse el archivo adjunto para abrirlo en Vista Rápida. Puede tener que esperar a que se descargue antes de verlo. Vista Rápida es compatible con los siguientes tipos de documento: • .doc, .docx: Microsoft Word • .htm, .html: página web • .key: Keynote • .numbers: Numbers • .pages: Pages • .pdf: Vista Previa, Adobe Acrobat • .ppt, .pptx: Microsoft PowerPoint • .rtf: formato de texto enriquecido • .txt: texto • .vcf: información de contacto • .xls, .xlsx: Microsoft Excel Para obtener más información sobre solución de problemas, vaya a www.apple.com/es/support/ipad.Apéndice C Seguridad, manejo y soporte 142 Sonido, música y vídeo Si el iPad no reproduce sonido o vídeo, pruebe los siguientes pasos. No hay sonido • Asegúrese de que no haya nada que cubra el altavoz del iPad. • Asegúrese de que el interruptor lateral no esté en la posición de silencio. Consulte Botón de volumen e interruptor lateral en la página 10. • Si está utilizando un auricular manos libres, desconéctelo y vuelva a conectarlo. Asegúrese de que el conector esté correctamente enchufado. • Asegúrese de que el volumen no esté bajado del todo. • La música en el iPad podría estar en pausa. Si está utilizando un manos libres con botón de reproducción, pulse este botón para reanudar la reproducción o, desde la pantalla de inicio, pulse Música y luego pulse . • Compruebe si ha establecido un límite de volumen. En Ajustes, vaya a Música > “Límite de volumen”. • Si está utilizando el puerto de salida de línea de la base iPad Dock (opcional), asegúrese de que los altavoces externos o el equipo estéreo estén encendidos, que estén conectados correctamente y que funcionen bien. Deberá utilizar los controles de volumen de los altavoces externos o del equipo estéreo, no los del iPad. • Si está utilizando una app compatible con AirPlay, compruebe que el dispositivo AirPlay al que está enviando el sonido esté activado y que el volumen esté subido. Si desea oír el sonido a través del altavoz del iPad, pulse y selecciónelo en la lista. No se reproduce una canción, un vídeo u otro contenido Es posible que la canción, el vídeo, el audiolibro o el podcast esté codificado en un formato no compatible con el iPad. Para obtener información sobre los formatos de archivo de audio y vídeo compatibles con el iPad, vaya a www.apple.com/es/ipad/specs, www.apple.com/mx/ipad/specs o www.apple.com/la/ipad/specs. Si la biblioteca de iTunes contiene alguna canción o vídeo no compatible con el iPad, es posible que pueda convertirlos a un formato que sí sea compatible con el iPad. Por ejemplo, puede utilizar iTunes para Windows para convertir archivos WMA no protegidos a un formato compatible con el iPad. Para obtener más información, abra iTunes y seleccione Ayuda > Ayuda iTunes. No se reproduce ningún vídeo o sonido al utilizar AirPlay Para enviar audio o vídeo a un dispositivo AirPlay, como un Apple TV, el iPad y el dispositivo AirPlay deben estar conectados a la misma red inalámbrica. Si no ve el botón , significa que el iPad no está conectado a la misma red Wi-Fi que el dispositivo AirPlay o que la app en cuestión no es compatible con AirPlay. • Cuando se envía sonido o vídeo a un dispositivo AirPlay, el iPad no muestra el vídeo o no reproduce el audio. Para dirigir el contenido al iPad y desconectarlo del dispositivo AirPlay, pulse y seleccione iPad en la lista. • Algunas apps solo reproducen el audio a través de AirPlay. Si el vídeo no funciona, asegúrese de que la aplicación que está utilizando admite tanto audio como vídeo. • Si el Apple TV se ha configurado para solicitar un código, deberá introducirlo en el iPad cuando se le pida para poder usar AirPlay.Apéndice C Seguridad, manejo y soporte 143 • Asegúrese de que los altavoces del dispositivo AirPlay estén encendidos y de que el volumen de los mismos esté subido. Si está utilizando un Apple TV, asegúrese de que la fuente de entrada del televisor está ajustada en el Apple TV. Asegúrese de que el control de volumen del iPad esté subido. • El iPad debe permanecer conectado a la red Wi-Fi durante la reproducción en tiempo real con AirPlay. Si coloca el iPad fuera del radio de alcance, se detendrá la reproducción. • En función de la velocidad de la red, la reproducción puede tardar 30 segundos o más en iniciarse cuando se utiliza AirPlay. Para obtener más información sobre AirPlay, vaya a support.apple.com/kb/HT4437?viewlocale=es_ES. No se reproduce ninguna imagen en el televisor o proyector conectado al iPad Al conectar el iPad a un televisor o proyector mediante un cable USB, la pantalla conectada duplica automáticamente la pantalla del iPad. Algunas apps permiten utilizar la pantalla conectada como un segundo monitor. Compruebe los ajustes y la documentación de la app en cuestión. • Para ver vídeos HD en alta resolución, utilice el adaptador digital VGA de Apple o un cable de vídeo por componentes. • Asegúrese de que el cable de vídeo está bien conectado por ambos extremos y que es compatible con los dispositivos. Si el iPad está conectado a un receptor o descodificador AV, pruebe a conectarlo directamente al televisor o proyector. • Asegúrese de que el televisor tiene seleccionada la entrada de vídeo adecuada, como HDMI o vídeo por componentes. • Si el vídeo no se ve, pulse el botón de inicio y, a continuación, desconecte y vuelva a conectar el cable e inténtelo de nuevo. Las tiendas iTunes Store y App Store Para utilizar las tiendas iTunes Store o App Store, el iPad debe disponer de conexión a Internet. Consulte Conexión a una red Wi-Fi en la página 117. La tienda iTunes Store o App Store no está disponible Para comprar contenidos de iTunes Store o App Store, necesita un ID de Apple. Si lo desea, puede configurar un ID de Apple en el iPad. Vaya a Ajustes > “iTunes Store y App Store” y, a continuación, pulse Conectarse. También puede crear un ID de Apple desde el ordenador. Para ello, abra iTunes y seleccione Store > “Crear cuenta”. Nota: Las tiendas iTunes Store y App Store no están disponibles en todos los países.Apéndice C Seguridad, manejo y soporte 144 Más información, servicio y soporte En la siguiente tabla se detalla dónde puede obtener más información sobre seguridad, software, asistencia técnica y soporte en relación con el iPad. Para obtener información acerca de Haga lo siguiente Cómo usar el iPad de forma segura Consulte Información importante sobre seguridad en la página 133. Servicio y soporte iPad, consejos, foros y descargas de software de Apple Visite www.apple.com/es/support/ipad. Las últimas novedades del iPad Vaya a www.apple.com/es/ipad. Gestión de su cuenta de ID de Apple Vaya a https://appleid.apple.com/es_ES, https://appleid.apple.com/es_LA o https://appleid.apple.com/es_MX Cómo usar iCloud Visite www.apple.com/es/icloud. Para obtener información de soporte, visite www.apple.com/mx/support/icloud, o www.apple.com/la/support/icloud. Cómo usar iTunes Abra iTunes y seleccione Ayuda > Ayuda iTunes. Para acceder a las lecciones de iTunes en Internet (no disponibles en todos los países), visite www.apple.com/es/support/itunes. Uso de otras apps de Apple iOS Visite www.apple.com/es/support/ios. Cómo encontrar el número de serie o IMEI de su iPad Puede encontrar el número de serie o el código IMEI (identidad internacional de equipo móvil) del iPad en la caja del iPad. O bien en el iPad, en Ajustes > General > Información. Para obtener más información, vaya a http://support.apple.com/kb/HT4061?viewlocale=es_ES. Obtención de servicios técnicos en garantía En primer lugar, siga los consejos de este manual. A continuación, visite www.apple.com/es/support/ipad. Visualizar la información de regulación del iPad En el iPad, vaya a Ajustes > General > Acerca de > Legal > Regulaciones. Servicio de sustitución de la batería Vaya a www.apple.com/es/batteries/replacements.html, www.apple.com/mx/batteries/replacements.html o www.apple.com/la/batteries/replacements.html. Uso del iPad en un entorno empresarial Vaya a www.apple.com/es/ipad/business. Información sobre residuos y reciclaje El iPad debe desecharse de acuerdo con la normativa local aplicable. Como el iPad contiene una batería, es necesario desecharlo separadamente del resto de los residuos domésticos. Cuando el iPad alcance el final de su vida útil, póngase en contacto con Apple o con las autoridades locales para obtener información con respecto a las opciones de reciclaje. Para obtener información sobre el programa de reciclaje de Apple, vaya a www.apple.com/es/recycling, www.apple.com/mx/recycling o www.apple.com/la/recycling. Sustitución de la batería: La batería de iones de litio del iPad solo debe cambiarla Apple o un proveedor de servicios Apple autorizado, y debe reciclarse o eliminarse separadamente de la basura normal. Para obtener información sobre el reciclaje y sustitución de baterías, vaya a to www.apple.com/es/batteries/replacements.html, www.apple.com/mx/batteries/replacements.html o www.apple.com/la/batteries/replacements.html.Apéndice C Seguridad, manejo y soporte 145 Eficiencia del cargador de la batería Türkiye Türkiye Cumhuriyeti: EEE Yönetmeliğine Uygundur. Unión Europea: información sobre eliminación de baterías y materiales electrónicos El símbolo anterior indica que, de acuerdo con la normativa local, este producto y/o su batería no deben desecharse junto con los residuos domésticos. Cuando llegue al final de su vida útil, llévelo a los puntos de recogida estipulados por la administración local. La recogida selectiva y el reciclaje del producto y/o de su batería en el momento de desecharlo contribuirán a preservar los recursos naturales y a proteger la salud humana y el medio ambiente. Union Européenne—informations sur l’élimination: Le symbole ci-dessus signifie que, conformé- ment aux lois et réglementations locales, vous devez jeter votre produit et/ou sa batterie séparément des ordures ménagères. Lorsque ce produit arrive en fin de vie, apportez-le à un point de collecte désigné par les autorités locales. La collecte séparée et le recyclage de votre produit et/ou de sa batterie lors de sa mise au rebut aideront à préserver les ressources naturelles et à s’assurer qu’il est recyclé de manière à protéger la santé humaine et l’environnement. Europäische Union—Informationen zur Entsorgung: Das oben aufgeführte Symbol weist darauf hin, dass dieses Produkt und/oder die damit verwendete Batterie den geltenden gesetzlichen Vorschriften entsprechend und vom Hausmüll getrennt entsorgt werden muss. Geben Sie dieses Produkt zur Entsorgung bei einer offiziellen Sammelstelle ab. Durch getrenntes Sammeln und Recycling werden die Rohstoffreserven geschont und es ist sichergestellt, dass beim Recycling des Produkts und/oder der Batterie alle Bestimmungen zum Schutz von Gesundheit und Umwelt eingehalten werden. Unione Europea—informazioni per lo smaltimento: Il simbolo qui sopra significa che, in base alle leggi e alle normative locali, il prodotto e/o la sua batteria dovrebbero essere riciclati separatamente dai rifiuti domestici. Quando il prodotto diventa inutilizzabile, portalo nel punto di raccolta stabilito dalle autorità locali. La raccolta separata e il riciclaggio del prodotto e/o della sua batteria al momento dello smaltimento aiutano a conservare le risorse naturali e assicurano che il riciclaggio avvenga nel rispetto della salute umana e dell’ambiente. Europeiska unionen—information om kassering: Symbolen ovan betyder att produkten och/ eller dess batteri enligt lokala lagar och bestämmelser inte får kastas tillsammans med hushållsavfallet. När produkten har tjänat ut måste den tas till en återvinningsstation som utsetts av lokala myndigheter. Genom att låta den uttjänta produkten och/eller dess batteri tas om hand för återvinning hjälper du till att spara naturresurser och skydda hälsa och miljö.Apéndice C Seguridad, manejo y soporte 146 Brasil—Informações sobre descarte e reciclagem O símbolo indica que este produto e/ou sua bateria não devem ser descartadas no lixo doméstico. Quando decidir descartar este produto e/ou sua bateria, faça-o de acordo com as leis e diretrizes ambientais locais. Para informações sobre o programa de reciclagem da Apple, pontos de coleta e telefone de informações, visite www.apple.com/br/environment. Apple y el medio ambiente En Apple somos conscientes de nuestra responsabilidad en la minimización del impacto ambiental de nuestras operaciones y nuestros productos. Para obtener más información, visite www.apple.com/es/environment.KApple Inc. © 2012 Apple Inc. Todos los derechos reservados. Apple, el logotipo de Apple, AirPlay, AirPort, AirPort Express, AirPort Extreme, Aperture, Apple TV, FaceTime, Finder, iBooks, iCal, iLife, iPad, iPhone, iPhoto, iPod, iPod touch, iSight, iTunes, iTunes Extras, Keynote, Mac, Mac OS, Numbers, OS X, Pages, Photo Booth, Safari, Siri, Smart Cover, Spotlight y Time Capsule son marcas comerciales de Apple Inc., registradas en EE UU y en otros países. AirPrint, EarPods, Flyover, Acceso Guiado, iMessage y MultiTouch son marcas comerciales de Apple Inc. Apple Store, Genius, iAd, iCloud, iTunes Extras, iTunes Plus y iTunes Store son marcas de servicio de Apple Inc., registradas en EE UU y en otros países. App Store, iBookstore y iTunes Match son marcas de servicio de Apple Inc. Adobe y Photoshop son marcas comerciales o marcas comerciales registradas de Adobe Systems Incorporated en EE UU y en otros países. La palabra Bluetooth®, la marca y sus logotipos son marcas comerciales registradas propiedad de Bluetooth SIG, Inc., y cualquier utilización de tales marcas por parte de Apple Inc. se realiza bajo licencia. IOS es una marca comercial o una marca registrada de Cisco en EE UU y en otros países y se utiliza bajo licencia. Es posible que algunas apps no estén disponibles en todas las zonas. La disponibilidad de las apps está sujeta a variaciones. Contenido disponible en iTunes. La disponibilidad de los títulos está sujeta a variaciones. Otros nombres de productos y empresas aquí mencionados pueden ser marcas comerciales de sus respectivos titulares. La mención de productos de terceras partes tiene únicamente propósitos informativos y no constituye aprobación ni recomendación. Apple declina toda responsabilidad referente al uso o el funcionamiento de estos productos. Todos los acuerdos, disposiciones o garantías, en caso de que las hubiera, se establecerán directamente entre los proveedores y los usuarios potenciales. En la realización de este manual se ha puesto el máximo cuidado para asegurar la exactitud de la información que en él aparece. Apple no se responsabiliza de los posibles errores de impresión o copia. E019-2401/09-2012 Guide d’informations importantes sur le produit iPadCe Guide d’informations importantes sur le produit contient des informations relatives à la sécurité, à la manipulation, à l’élimination et au recyclage, à la réglementation et à la licence logicielle, ainsi que la garantie limitée d’un an pour l’iPad. Vous trouverez d’autres informations sur l’environnement dans le Guide de l’utilisateur de l’iPad à l’adresse suivante : support.apple.com/manuals/ ipad/fr_FR/ ±Afin d’éviter toute blessure, consultez les informations relatives à la sécurité ci-dessous, ainsi que le mode d’emploi, avant d’utiliser l’iPad. Pour prendre connaissance des instructions d’utilisation détaillées, lisez le Guide de l’utilisateur de l’iPad sur votre iPad en consultant help. apple.com/ipad ou à l’aide du signet Guide de l’utilisateur de l’iPad dans Safari. Une version téléchargeable du Guide de l’utilisateur de l’iPad et la plus récente version de ce Guide d’informations importantes sur le produit sont disponibles à la page : support.apple.com/manuals/ ipad/fr_FR/ Informations importantes concernant la sécurité et la manipulation ATTENTION :  le fait de ne pas suivre les présentes instructions de sécurité peut provoquer un incendie, une électrocution ou d’autres blessures, ainsi que des dégâts à l’iPad et d’autres propriétés. Transport et manipulation de l’iPad L’iPad contient des composants fragiles. Ne laissez pas tomber, ne désassemblez pas, n’ouvrez pas, n’écrasez pas, ne tordez pas, ne déformez pas, ne perforez pas, ne réduisez pas en morceaux, ne mettez pas dans un four à micro-ondes, ne mettez pas au feu, ne peignez pas ou n’insérez pas de corps étranger dans l’iPad. Protection contre l’eau et l’humidité N’utilisez pas l’iPad sous la pluie, à proximité d’un évier ou de tout autre lieu humide. Veillez à ne pas renverser d’aliments ou de liquides sur l’iPad. Si l’iPad est mouillé, débranchez tous les câbles, éteignez-le (appuyez sur le bouton Marche/Veille puis faites glisser le curseur à l’écran) avant de procéder au nettoyage. Laissez-le ensuite sécher entièrement avant de le rallumer.iPad N’essayez jamais de sécher l’iPad à l’aide d’une source externe de chaleur telle qu’un four à micro-ondes ou un sèche-cheveux. Un iPad endommagé après avoir été exposé à des liquides est inutilisable. Réparation ou modification de l’iPad N’essayez jamais de réparer ou de modifier l’iPad vousmême. Le démontage de l’iPad peut provoquer des dégâts non couverts par la garantie. L’iPad ne contient aucune pièce manipulable par l’utilisateur. La réparation ne doit être réalisée que par un fournisseur de service pour matériel agréé Apple. Si l’iPad a été immergé dans de l’eau ou perforé, ou qu’il a subi une chute grave, ne vous en servez pas avant de l’avoir apporté à un Centre de Services Agréé Apple. Pour en savoir plus sur la réparation, sélectionnez Aide iPad dans le menu Aide d’iTunes ou consultez la page : www.apple.com/fr/support/ ipad/service Remplacement des batteries La batterie rechargeable de l’iPad ne doit être remplacée que par Apple ou un Centre de Services Agréé Apple. Pour en savoir plus sur les services de remplacement de la batterie, consultez la page : http://www.apple.com/fr/batteries/replacements.html Recharge de l’iPad Pour charger l’iPad, utilisez uniquement le câble Apple Dock Connector vers USB avec un adaptateur secteur Apple USB Power Adapter 10 W, ou un port USB à forte alimentation sur un autre dispositif conforme à la norme USB 2.0, un autre produit ou accessoire de marque Apple conçu pour fonctionner avec l’iPad, ou un accessoire tiers dont l’utilisation est certifiée par le logo Apple « Works with iPad ». Avant d’utiliser tout produit ou accessoire avec l’iPad, consultez l’ensemble des consignes de sécurité le concernant. Apple n’est responsable ni du fonctionnement d’accessoires tiers, ni de leur conformité aux normes de réglementation et de sécurité. Lorsque vous utilisez l’adaptateur secteur Apple USB Power Adapter 10 W pour recharger votre iPad, assurez-vous qu’il est correctement assemblé avant de le brancher dans une prise de courant. Insérez ensuite fermement l’adaptateur secteur Apple USB Power Adapter 10 W dans la prise de courant. Ne branchez ou débranchez en aucun cas l’adaptateur secteur Apple USB Power Adapter 10 W lorsque vous avez les mains mouillées. L’adaptateur secteur Apple USB Power Adapter 10 W peut chauffer lors de son usage normal. Veillez à toujours prévoir une ventilation adéquate autour de l’adaptateur secteur Apple USB Power Adapter 10 W et à manipuler celui-ci avec précaution. Débranchez l’adaptateur secteur dans les situations suivantes :  Le câble d’alimentation ou la prise est usée ou abîmée.  L’adaptateur est exposé à la pluie, à des liquides ou à une humidité excessive.  Le boîtier de l’adaptateur a été abîmé.  Vous avez l’impression que l’adaptateur a besoin d’être réparé ou révisé.  Vous souhaitez nettoyer l’adaptateur. Prévention de la diminution de l’acuité auditive Il existe des risques de perte d’audition irréversibles si le récepteur, les écouteurs ou le combiné sont réglés à pleine puissance. Utilisez uniquement un récepteur, des écouteurs ou un combiné compatibles avec votre appareil. Allumez votre appareil et vérifiez le volume avant de porter tout dispositif à vos oreilles. Avec le temps, vous pouvez vous habituer à un volume plus élevé qui vous semble normal mais est susceptible d’endommager votre ouïe. Si vous entendez des bourdonnements ou un son étouffé, arrêtez l’écoute et faites-vous ausculter par un spécialiste de l’audition. Plus le volume est élevé, plus votre audition risque d’être endommagée rapidement. Les spécialistes de l’audition donnent les recommandations suivantes :  Limitez la durée d’utilisation à volume élevé des écouteurs, du récepteur ou du combiné.  Évitez d’augmenter le volume pour couvrir un environnement bruyant.  Baissez le volume si vous n’entendez pas les gens parler auprès de vous. Pour plus de renseignements sur la manière de régler un volume maximum sur l’iPad, consultez le Guide de l’utilisateur de l’iPad. Conduite en toute sécurité L’utilisation de l’iPad seul ou avec des écouteurs (même dans le cas d’une utilisation avec une seule oreille) lors de la conduite d’un véhicule ou de l’utilisation d’une bicyclette n’est pas recommandée et est illégale dans certaines zones géographiques. Consultez et respectez les lois et réglementations applicables en matière d’utilisation de dispositifs mobiles comme l’iPad à l’endroit où vous conduisez. Soyez vigilant et attentif lors de la conduite d’un véhicule ou d’une bicyclette. Si vous décidez d’utiliser l’iPad pendant que vous conduisez, n’oubliez pas les consignes suivantes :  Prêtez toute votre attention à la conduite et à la route. L’utilisation d’un dispositif mobile lors de la conduite peut vous distraire de celle-ci. Si vous avez du mal à vous concentrer alors que vous conduisez n’importe quel type de véhicule, que vous utilisez une bicyclette ou que vous réalisez toute activité qui demande votre attention complète, arrêtez-vous sur le bord de la route si les conditions de conduite l’exigent.  Lorsque vous conduisez, n’envoyez pas de courriers électroniques, ne prenez pas de notes, ne recherchez pas de numéro de téléphone et ne réalisez aucune autre activité qui sollicite votre concentration. La rédaction ou la lecture de courrier électronique, la prise rapide d’une liste de tâches ou la consultation de votre carnet d’adresses détourne votre attention de votre responsabilité principale, à savoir conduire en toute sécurité. Localisation en sécurité Si votre iPad comprend des applications fournissant des cartes, des indications de points cardinaux, des directions et une assistance à la navigation géodépendante, ces applications ne doivent être utilisées que pour une simple aide à la navigation et ne sauraient être utilisées pour déterminer avec précision des lieux, la proximité à un lieu, une distance ou une direction. Les cartes, la boussole numérique, les directions et les applications basées sur l’emplacement fournies par Apple se basent sur des données recueillies et des services offerts par des tierces parties. Ces services de données sont susceptibles de faire l’objet de modifications et ne sont pas forcément disponibles partout. Les cartes, les points cardinaux, les directions ou les renseignements basés sur l’emplacement peuvent donc se révéler indisponibles, inexacts ou incomplets. L’iPad contient une boussole intégrée dans le coin supérieur droit de liPad. Les indications de cette boussole peuvent être faussées par des interférences magnétiques ou météorologiques. Ne vous fiez jamais uniquement à cette boussole numérique pour déterminer une direction. Comparez les renseignements fournis sur l’iPad avec votre environnement et reportez-vous aux panneaux indicateurs pour résoudre toute différence existante. Véhicules équipés d’un coussin gonflable de sécurité (airbag) Un coussin de sécurité (également connus sous le nom d’« Airbag ») se gonfle avec une grande force. Ne stockez pas l’iPad, ni aucun de ses accessoires, dans la zone située au-dessus du coussin gonflable ou dans sa zone de déploiement. Épilepsie, malaises et fatigue oculaire Certaines personnes, représentant un faible pourcentage de la population, peuvent subir des malaises ou des crises (même si elles n’avaient jamais présenté auparavant de tels symptômes) lors de l’exposition à des stimulations lumineuses et notamment en jouant à des jeux vidéo ou en regardant des vidéos. Si vous avez déjà subi des crises d’épilepsie ou des malaises ou que vous avez des antécédents familiaux en la matière, vous devez consulter un médecin avant de jouer à des jeux vidéo (le cas échéant) ou de visualiser des vidéos sur votre iPad. Cessez d’utiliser l’iPad et consultez un médecin si vous ressentez des maux de tête ou si vous souffrez d’un malaise, d’une crise d’épilepsie, d’une convulsion, d’une contraction musculaire ou d’une gêne oculaire, de la perte de perception, de mouvements involontaires ou d’une perte de l’orientation. Afin de réduire les risques de maux de tête, de malaises, de crises d’épilepsie et de fatigue oculaire, évitez l’usage prolongé de l’iPad, maintenez-l’iPad à distance de vos yeux, utilisez-le dans une pièce bien éclairée et faites des pauses régulières. Parties en verre La partie extérieure de l’écran de l’iPad est faite de verre. Ce verre est susceptible de se briser en cas de chute de l’iPad sur une surface dure ou d’impact important. Si le verre se fendille ou se craquèle, ne le touchez pas et n’essayez pas de retirer les éclats ; arrêtez d’utiliser l’iPad. Le bris de verre consécutif à un mauvais usage ou traitement n’est pas couvert par la garantie. N’utilisez pas l’iPad tant que le verre n’a pas été remplacé par Apple ou un Centre de Services Agréé Apple. Risques d’étouffement L’iPad contient de petits composants, ce qui peut représenter un risque d’étouffement pour les enfants en bas âge. Gardez l’iPad et ses accessoires à l’écart des jeunes enfants. Mouvements répétitifs Lorsque vous effectuez des tâches répétitives telles que taper du texte ou jouer sur votre iPad, vous êtes susceptible d’éprouver une gêne occasionnelle dans les mains, les bras, les épaules, le cou ou d’autres parties du corps. Faites des pauses régulières et, si la sensation d’inconfort continue à se faire sentir pendant ou après l’utilisation, arrêtez l’utilisation et consultez un médecin. Prise en main de l’iPad Vous pouvez tenir et utiliser l’iPad de nombreuses manières différentes. Il est important de trouver une posture confortable lorsque vous utilisez l’iPad, et de prendre des pauses fréquentes. Utilisez votre cuisse, une table, un boîtier ou une station d’accueil pour soutenir l’iPad lorsque vous vous en servez. Atmosphères potentiellement explosives Éteignez l’iPad (maintenez le bouton Marche/Veille enfoncé, puis faites glisser le curseur à l’écran) lorsque vous vous trouvez dans toute atmosphère présentant des risques d’explosion. Ne rechargez pas l’iPad et respectez toutes les pancartes et consignes. Toute étincelle dans une telle zone pourrait provoquer une explosion ou un incendie et résulter en une blessure grave, voire la mort. Les zones présentant une atmosphère potentiellement explosive sont souvent, mais pas toujours, indiquées clairement. les zones de remplissage de combustible (telles que les stationsservices), les zones en dessous du niveau du pont sur les bateaux, les sites de transfert ou de stockage de combustibles ou de produits chimiques, les véhicules utilisant du gaz de pétrole liquéfié (notamment du propane ou du butane), les zones où l’air contient des produits chimiques ou des particules (telles que grains, poussières ou poudres métalliques) et toute autre zone où il vous serait normalement conseillé d’éteindre le moteur de votre véhicule. Utilisation des connecteurs et des ports Ne forcez jamais sur un connecteur pour le faire entrer dans un port. Vérifiez l’absence de toute obturation du port. Si le connecteur et le port ne se connectent pas facilement, c’est qu’ils ne coïncident probablement pas. Assurez-vous que le connecteur correspond au port et que vous avez correctement placé le connecteur par rapport au port. Maintien de l’iPad dans une gamme de températures acceptables Utilisez l’iPad uniquement dans un endroit où la température est comprise entre 0 ºC et 35 ºC. Des températures élevées ou basses peuvent réduire temporairement la durée de vie de la batterie ou provoquer un arrêt momentané du fonctionnement de l’iPad. Évitez les changements brusques de température ou d’humidité lors de l’utilisation de l’iPad, car de la condensation peut se former sur l’iPad ou à l’intérieur. Conservez l’iPad à des températures comprises entre -20 ºC et 45 ºC. Ne laissez pas l’iPad dans une voiture en stationnement, car la température pourrait dépasser cette plage de températures. Lorsque vous utilisez l’iPad ou rechargez sa batterie, il est normal que l’iPad chauffe. La partie extérieure de l’iPad agit en tant que surface de refroidissement qui transfère la chaleur de l’intérieur de l’unité vers l’air qui l’entoure. Entretien de l’extérieur de l’iPad Manipulez votre iPad avec précaution pour conserver sa finition. Si vous avez peur de le rayer ou de le griffer, vous pouvez utiliser l’un des nombreux étuis de transport vendus séparément. Pour nettoyer l’iPad, débranchez tous les câbles et éteignez l’iPad (appuyez sur le bouton Marche/Veille et maintenez-le enfoncé puis faites glisser le curseur à l’écran). Utilisez ensuite un tissu doux, légèrement humide et sans peluche. Évitez toute pénétration d’humidité dans les orifices de l’appareil. N’utilisez pas de produit lave-vitre, de détergent domestique, d’aérosol, de solvant, d’alcool, d’ammoniac ou de produit abrasif pour nettoyer l’iPad. L’écran de l’iPad dispose d’une protection oléophobe. Il vous suffit d’essuyer l’iPad avec un chiffon doux et non pelucheux pour retirer les corps gras déposés par vos mains. Les propriétés oléophobes de ce film diminuent avec le temps et une utilisation normale. Évitez de frotter l’écran avec un matériau abrasif, afin de ne pas affecter davantage ses propriétés oléophobes et de ne pas le rayer.Exposition à de l’énergie de radiofréquences L’iPad est doté d’émetteurs et de récepteurs radio. Lorsqu’il est allumé, l’iPad envoie et reçoit de l’énergie de radiofréquences (RF) par le biais de son antenne. Les antennes Wi-Fi et Bluetooth® se trouvent derrière le logo Apple. L’iPad a été testé et il répond aux directives d’exposition DAS en matière de fonctionnement Wi-Fi et Bluetooth. Une antenne cellulaire se trouve sur le bord supérieur de l’iPad Wi-Fi + 3G, à l’opposé du bouton principal qui se trouve en bas. Pour optimiser les performances du dispositif mobile et vous assurer que toute exposition humaine à de l’énergie RF ne dépasse pas les directives de la FCC, de l’IC et de l’Union européenne, respectez toujours les instructions et précautions suivantes : Écartez l’appareil doté de l’antenne cellulaire (située sous le bord noir en haut de l’appareil) de votre corps et d’autres objets. L’iPad est conçu et fabriqué en accord avec les limites d’exposition à l’énergie RF définies par la FCC (Federal Communications Commission) aux États-Unis, Industry Canada (IC) au Canada et les entités régulatrices du Japon, de l’Union européenne et d’autres pays. L’exposition standard est calculée selon une unité de mesure nommée le débit d’absorption spécifique ou DAS. La limite de DAS applicable à l’iPad est définie à 1,6 watt par kilogramme (W/kg) par la FCC et par IC et à 2,0 W/ kg par le Conseil de l’Union européenne. Les tests de DAS sont réalisés en utilisant des positions de fonctionnement standard précisées par ces agences, avec l’iPad émettant dans toutes les bandes de fréquence à son plus haut niveau de puissance certifié. Bien que le DAS soit déterminé au plus haut niveau de puissance certifié dans chaque bande de fréquence, le niveau de DAS effectif de l’iPad en cours de fonctionnement peut être nettement au-dessous de la valeur maximale, car l’iPad ajuste en partie sa puissance d’émission en fonction de son orientation et de la proximité du réseau sans fil et de son orientation. De manière générale, plus vous êtes proche d’une station cellulaire de base, plus le niveau de puissance cellulaire émise est faible. L’iPad a été testé 1 et il répond aux directives d’exposition RF de la FCC, de l’IC et de l’Union 1 L’appareil a été testé par Compliance Certification Services, Fremont, Californie, conformément aux normes et procédures de mesures indiquées dans les documents FCC OET Bulletin 65, Supplément C (Édition 01-01) et IEEE 1528-2003 et Canada RSS 102. L’iPad est conforme à la Recommandation du Conseil Européen du 12 juillet 1999 relative à la limitation de l’exposition du public aux champs électromagnétiques [1999/519/EC]. européenne en matière de fonctionnement cellulaire. Selon des tests réalisés avec contact corporel direct, la valeur DAS maximale de l’iPad dans chaque bande de fréquence est la suivante : DAS FCC et IC Bande de fréquence (MHz) Limite de DAS FCC et IC 1g (W/kg) Valeur maximale (W/kg) Modèle A1416 2 400-2 483,5 1,6 1,15 5150-5250 1,6 0,52 5250-5350 1,6 1,16 5500-5700 1,6 1,19 5725-5850 1,6 1,19 DAS UE Bande Bande de fréquence (MHz) Limite de DAS UE 10g (W/kg) Valeur maximale (W/kg) Modèle A1416 Wi-Fi 2,4 GHz 2400-2483,5 2,0 0,52 Wi-Fi 5 GHz 5150-5350 2,0 0,26 5470-5725 2,0 0,46 Vous pouvez réduire encore plus votre exposition en limitant votre temps d’utilisation de l’iPad en mode sans fil, car la durée est un facteur dans l’exposition reçue par une personne, et en écartant plus l’iPad de votre corps, car le niveau d’exposition diminue de manière considérable avec la distance. Informations complémentaires Pour plus de renseignements mis à disposition par la FCC à propos de l’exposition aux RF, consultez la page www.fcc.gov/oet/rfsafety La FCC et la FDA (Food and Drug Administration) des États-Unis disposent également d’un site web destiné au public à l’adresse www.fda.gov/RadiationEmittingProducts/default.htm pour répondre aux demandes concernant la sécurité des téléphones portables. Consultez-le régulièrement pour être au courant des mises à jour. Pour en savoir plus sur la recherche scientifique liée à l’exposition aux RF, consultez la base de données maintenue par l’Organisation Mondiale de la Santé à l’adresse suivante : www.who.int/emf (en anglais)Interférences de radiofréquences Les émissions de radiofréquences des appareils électroniques peuvent perturber le fonctionnement d’autres appareils électroniques et engendrer des dysfonctionnements. Bien que l’iPad ait été conçu, testé et fabriqué en accord notamment avec les réglementations sur les émissions de radiofréquences des États-Unis, du Canada, de l’Union européenne et du Japon, les émetteurs sans fil et circuits électriques de l’iPad peuvent causer des interférences avec d’autres équipements électroniques. Nous vous recommandons donc de prendre les précautions suivantes : Avion L’utilisation de l’iPad peut être interdite dans les avions. Pour plus de renseignements sur l’utilisation du mode Avion pour désactiver les émetteurs sans fil de l’iPad, consultez le Guide de l’utilisateur de l’iPad. Véhicules Les émissions de radiofréquences de l’iPad peuvent affecter le système électronique des véhicules motorisés. En ce qui concerne votre véhicule, vérifiez avec le constructeur ou son représentant. Stimulateurs cardiaques L’association HMA des fabricants du secteur de la santé recommande de maintenir une séparation minimale de 15 cm entre tout téléphone sans fil portable et un stimulateur cardiaque afin d’éviter tout risque d’interférences avec celui-ci. Les personnes portant un stimulateur cardiaque :  doivent toujours conserver l’iPad à plus de 15 cm de leur stimulateur lorsque l’appareil sans fil est allumé. Si vous avez des raisons de suspecter la présence d’interférences, éteignez immédiatement l’iPad (maintenez le bouton Marche/Veille enfoncé, puis faites glisser le curseur à l’écran). Autres dispositifs médicaux Si vous utilisez tout autre dispositif médical personnel, consultez son fabricant ou votre médecin afin de déterminer s’il est blindé de manière adéquate contre les émissions de radiofréquences de l’iPad. Établissements de santé Les hôpitaux et établissements de santé peuvent utiliser des équipements particulièrement sensibles aux émissions de radiofréquences extérieures. Éteignez l’iPad lorsque le personnel ou des panneaux vous y invitent. Zones à explosion et sites signalés Pour ne pas interférer avec les opérations d’explosion, éteignez l’iPad dans les « zones à explosion » ou dans les zones indiquant d’arrêter les dispositifs radio. Respectez toutes les pancartes et toutes les consignes. Certification and Compliance See iPad for the certification and compliance marks specific to that device. To view, choose Settings > General > About > Regulatory. Australia New Zealand Model A1416 U.S. Model A1416 FCC ID: BCGA1416 Canada Model A1416 IC: 579C–A1416 Meets ICES-003 EU Model A1416 Japan Singapore Important:  Changes or modifications to this product not authorized by Apple could void the EMC and wireless compliance and negate your authority to operate the product. This product has demonstrated EMC compliance under conditions that included the use of compliant peripheral devices and shielded cables between system components. It is important that you use compliant peripheral devices and shielded cables between system components to reduce the possibility of causing interference to radios, televisions, and other electronic devices. FCC Compliance Statement This device complies with part 15 of the FCC rules. Operation is subject to the following two conditions: (1) this device may not cause harmful interference, and (2) this device must accept any interference received, including interference that may cause undesired operation. Note: This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications. However, there is no guarantee that interference will not occur in a particular installation. If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interference by one or more of the following measures:  Reorient or relocate the receiving antenna.  Increase the separation between the equipment and receiver.  Connect the equipment to an outlet on a circuit different from that to which the receiver is connected.  Consult the dealer or an experienced radio/TV technician for help. Wireless Radio Use: This device is restricted to indoor use when operating in the 5.15 to 5.25 GHz frequency band. Cet appareil doit être utilisé à l’intérieur. Canadian Compliance Statement Complies with the Canadian ICES-003 Class B specifications. Cet appareil numérique de la Classe B est conforme à la norme NMB-003 du Canada. This device complies with RSS 210 of Industry Canada. This Class B device meets all the requirements of the Canadian interference-causing equipment regulations. Cet appareil numérique de la Classe B respecte toutes les exigences du Règlement sur le matériel brouilleur du Canada. This device complies with Industry Canada licenseexempt RSS standard(s). Operation is subject to the following two conditions: (1) this device may not cause interference, and (2) this device must accept any interference, including interference that may cause undesired operation of the device. Cet appareil est conforme aux normes CNR exemptes de licence d’Industrie Canada. Le fonctionnement est soumis aux deux conditions suivantes : (1) cet appareil ne doit pas provoquer d’interférences et (2) cet appareil doit accepter toute interférence, y compris celles susceptibles de provoquer un fonctionnement non souhaité de l’appareil. European Community Compliance Statement The equipment complies with the RF Exposure Requirement 1999/519/EC, Council Recommendation of 12 July 1999 on the limitation of exposure of the general public to electromagnetic fields (0–300 GHz). This wireless device complies with the R&TTE Directive. EU Declaration of Conformity Български  Apple Inc. декларира, че това устройство с клетъчен,Wi-Fi и Bluetooth предавател е в съответствие със съществените изисквания и другите приложими правила на Директива 1999/5/ЕС. Česky  Společnost Apple Inc. tímto prohlašuje, že toto mobilní zařízení s technologiíWi-Fi a Bluetooth vyhovuje základním požadavkům a dalším příslušným ustanovením směrnice 1999/5/ES. Dansk  Undertegnede Apple Inc. erklærer herved, at følgende udstyr cellular,Wi-Fi og Bluetooth overholder de væsentlige krav og øvrige relevante krav i direktiv 1999/5/EF. Deutsch  Hiermit erklärt Apple Inc., dass sich Mobiltelefon,Wi-Fi und Bluetooth in Übereinstimmung mit den grundlegenden Anforderungen und den übrigen einschlägigen Bestimmungen der Richtlinie 1999/5/EG befinden. Eesti  Käesolevaga kinnitab Apple Inc., et see mobiil-,Wi-Fi- ja Bluetooth-seade vastab direktiivi 1999/5/EÜ põhinõuetele ja nimetatud direktiivist tulenevatele teistele asjakohastele sätetele. English  Hereby, Apple Inc. declares that this cellular, Wi-Fi, and Bluetooth device is in compliance with the essential requirements and other relevant provisions of Directive 1999/5/EC. Español  Por medio de la presente Apple Inc. declara que este dispositivo celular,Wi-Fi y Bluetooth cumple con los requisitos esenciales y cualesquiera otras disposiciones aplicables o exigibles de la Directiva 1999/5/CE. Ελληνικά  Mε την παρούσα, η Apple Inc. δηλώνει ότι αυτή η συσκευή κινητού,Wi-Fi και Bluetooth συμμορφώνεται προς τις βασικές απαιτήσεις και τις λοιπές σχετικές διατάξεις της Οδηγίας 1999/5/ΕΚ. Français  Par la présente Apple Inc. déclare que l’appareil cellulaire,Wi-Fi, et Bluetooth est conforme aux exigences essentielles et aux autres dispositions pertinentes de la directive 1999/5/CE. Islenska  Apple Inc. lýsir því hér með yfir að þetta tæki, sem er farsími, þráðlaus og með blátannartækni (e: cellular,Wi-Fi and Bluetooth,) fullnægir lágmarkskröfum og öðrum viðeigandi ákvæðum Evróputilskipunar 1999/5/EC. Italiano  Con la presente Apple Inc. dichiara che questo dispositivo cellulare,Wi-Fi e Bluetooth è conforme ai requisiti essenziali ed alle altre disposizioni pertinenti stabilite dalla direttiva 1999/5/CE. Latviski  Ar šo Apple Inc. deklarē, ka cellular,Wi-Fi un Bluetooth ierīce atbilst Direktīvas 1999/5/EK būtiskajām prasībām un citiem ar to saistītajiem noteikumiem. Lietuvių  Šiuo„Apple Inc.“ deklaruoja, kad korinio, „Wi-Fi“ ir„Bluetooth“ ryšio įrenginys atitinka esminius reikalavimus ir kitas 1999/5/EB Direktyvos nuostatas. Magyar  Alulírott, Apple Inc. nyilatkozom, hogy a mobil,Wi-Fi és Bluetooth megfelel a vonatkozó alapvetõ követelményeknek és az 1999/5/EC irányelv egyéb elõírásainak.Malti  Hawnhekk, Apple Inc., jiddikjara li danWi-Fi, & Bluetooth jikkonforma mal-ħtiġijiet essenzjali u ma provvedimenti oħrajn relevanti li hemm fidDirrettiva 1999/5/EC. Nederlands  Hierbij verklaart Apple Inc. dat het toestel cellular,Wi-Fi, en Bluetooth in overeenstemming is met de essentiële eisen en de andere bepalingen van richtlijn 1999/5/EG. Norsk  Apple Inc. erklærer herved at dette mobiltelefon-,Wi-Fi- og Bluetooth-apparatet er i samsvar med de grunnleggende kravene og øvrige relevante krav i EU-direktivet 1999/5/EF. Polski  Niniejszym Apple Inc. oświadcza, że ten telefon komórkowy, urządzenieWi-Fi oraz Bluetooth są zgodne z zasadniczymi wymogami oraz pozostałymi stosownymi postanowieniami Dyrektywy 1999/5/EC. Português  Apple Inc. declara que este dispositivo móvel,Wi-Fi e Bluetooth está em conformidade com os requisitos essenciais e outras disposições da Directiva 1999/5/CE. Română  Prin prezenta, Apple Inc. declară că acest aparat celular,Wi-Fi și Bluetooth este în conformitate cu cerinţele esenţiale şi cu celelalte prevederi relevante ale Directivei 1999/5/CE. Slovensko  Apple Inc. izjavlja, da so celične naprave ter napraveWi-Fi in Bluetooth skladne z  bistvenimi zahtevami in ostalimi ustreznimi določili direktive 1999/5/ES. Slovensky  Apple Inc. týmto vyhlasuje, že toto mobilné,Wi-Fi & Bluetooth zariadenie spĺňa základné požiadavky a všetky príslušné ustanovenia Smernice 1999/5/ES. Suomi  Apple Inc. vakuuttaa täten, että tämä matkapuhelin-,Wi-Fi- ja Bluetooth-tyyppinen laite on direktiivin 1999/5/EY oleellisten vaatimusten ja sitä koskevien direktiivin muiden ehtojen mukainen. Svenska  Härmed intygar Apple Inc. att denna mobiltelefoni-,Wi-Fi-, och Bluetooth-enhet står i överensstämmelse med de väsentliga egenskapskrav och övriga relevanta bestämmelser som framgår av direktiv 1999/5/EG. A copy of the EU Declaration of Conformity is available at: www.apple.com/euro/compliance iPad can be used in the following countries: European Community Restrictions Français  Pour usage en intérieur uniquement. Consultez l’Autorité de Régulation des Communications Electroniques et des Postes (ARCEP) pour connaître les limites d’utilisation des canaux 1 à 13. www.arcep.fr Japan Compliance Statement— VCCI Class B Statement Wireless Radio Use: This device is restricted to indoor use when operating in the 5.15 to 5.25 GHz frequency band. Cet appareil doit être utilisé à l’intérieur. この製品は、周波数帯域 5.15 ~ 5.35 GHz で動作しているときは、 屋内においてのみ使用可能です。 Taiwan Wireless StatementsInformations concernant l’élimination et le recyclage Pour en savoir plus sur le programme de recyclage Apple, consultez le site : www.apple.com/fr/recycling Deutschland: Dieses Gerät enthält Batterien. Bitte nicht in den Hausmüll werfen. Entsorgen Sie dieses Gerätes am Ende seines Lebenszyklus entsprechend der maßgeblichen gesetzlichen Regelungen. Nederlands: Gebruikte batterijen kunnen worden ingeleverd bij de chemokar of in een speciale batterijcontainer voor klein chemisch afval (kca) worden gedeponeerd. Türkiye:  EEE yönetmeliğine (Elektrikli ve Elektronik Eşyalarda Bazı Zararlı Maddelerin Kullanımının Sınırlandırılmasına Dair Yönetmelik) uygundur. European Union—Disposal Information: The symbol above means that according to local laws and regulations your product should be disposed of separately from household waste. When this product reaches its end of life, take it to a collection point designated by local authorities. Some collection points accept products for free. The separate collection and recycling of your product at the time of disposal will help conserve natural resources and ensure that it is recycled in a manner that protects human health and the environment. Brasil: Informações sobre descarte e reciclagem: O símbolo acima indica que este produto e/ou sua bateria não devem ser descartadas no lixo doméstico. Quando decidir descartar este produto e/ou sua bateria, faça-o de acordo com as leis e diretrizes ambientais locais. Para informações sobre o programa de reciclagem da Apple, pontos de coleta e telefone de informações, visite www.apple.com/br/environment. Contrat de licence logicielle L’utilisation de l’iPad implique l’acceptation des conditions des licences logicielles Apple et tierces disponibles à l’adresse :www.apple.com/legal/sla Garantie d’Apple Limitée à un (1) an - iPad Pour les produits de marque Apple uniquement EN QUOI LE DROIT DE LA CONSOMMATION SE RAPPORTE-T-IL A CETTE GARANTIE CETTE GARANTIE VOUS CONFERE DES DROITS SPECIFIQUES ET IL SE PEUT QUE VOUS BENEFICIIEZ D’AUTRES DROITS EN FONCTION DE VOTRE PAYS, REGION OU ETAT, Y COMPRIS POUR LES CONSOMMATEURS FRANÇAIS LES DROITS DETAILLES CI-DESSOUS. A L’EXCEPTION DE CE QUI EST AUTORISE PAR LA LOI, APPLE N’EXCLUT, NE LIMITE NI NE SUSPEND AUCUN DES AUTRES DROITS DONT VOUS POURRIEZ BENEFICIER, NOTAMMENT CEUX RESULTANT DE LA GARANTIE LEGALE DE CONFORMITÉ ATTACHEE AU CONTRAT DE VENTE. AFIN DE PRENDRE PLEINEMENT CONNAISSANCE DE VOS DROITS, NOUS VOUS INVITONS A CONSULTER LES LOIS DE VOTRE PAYS, REGION OU ETAT. LES LIMITATIONS DE GARANTIE POUVANT AFFECTER LE DROIT DE LA CONSOMMATION DANS LA MESURE AUTORISEE PAR LA LOI, LA PRESENTE GARANTIE ET LES RECOURS STIPULES CI-DESSUS SONT EXCLUSIFS ET SONT EN LIEU ET PLACE DE TOUTES AUTRES GARANTIES, RECOURS ET DROITS, QU’ILS SOIENT ECRITS OU ORAUX, LEGAUX, EXPRES OU TACITES. APPLE EXCLUT EXPRESSEMENT TOUTES GARANTIES LEGALES ET TACITES, Y COMPRIS ET SANS QUE CETTE LISTE NE SOIT LIMITATIVE, LES GARANTIES DE QUALITE MARCHANDE, DE CONFORMITE A UN USAGE PARTICULIER ET DES VICES CACHES OU LATENTS, DANS LA MESURE DE CE QUI EST PERMIS PAR LA LOI. SI CES GARANTIES NE PEUVENT PAS VALABLEMENT ETRE EXCLUES, APPLE LIMITERA, DANS LA MESURE AUTORISEE, LA DUREE DE CELLES-CI ET LES RECOURS Y AFFERENTS, A LA DUREE DE LA PRESENTE GARANTIE COMMERCIALE ET, A LA DISCRETION D’APPLE, A LA REPARATION OU AU REMPLACEMENT DU PRODUIT, COMME DECRIT CI-DESSOUS. CERTAINS PAYS, ETATS OU REGIONS N’AUTORISENT PAS LA LIMITATION DE LA DUREE DES GARANTIES LEGALES. DE CE FAIT, LES LIMITATIONS PREVUES CIDESSUS PEUVENT NE PAS S’APPLIQUER A VOUS. CE QUI EST COUVERT PAR LA PRESENTE GARANTIE COMMERCIALE Apple garantit le produit de marque Apple et ses accessoires tels que contenus dans l’emballage d’origine (le “Produit Apple”) contre les vices de fabrication et de matière, dans des conditions normales d’utilisation, conformément aux instructions diffusées par Apple, pour une durée de UN (1) AN à compter de la date d’achat par l’acheteur final (“Durée de la Garantie”). Les instructions diffusées par Apple incluent, sans limitation, les informations contenues dans la documentation technique, les manuels d’utilisation et les communications. CE QUI N’EST PAS COUVERT PAS LA PRESENTE GARANTIE COMMERCIALE La présente garantie commerciale ne s’applique pas aux produits ou logiciels qui ne sont pas de la marque Apple, même s’ils sont emballés ou vendus avec un Produit Apple. Les fabricants, fournisseurs ou éditeurs autres que Apple peuvent vous fournir leurs propres garanties mais Apple, dans la mesure de ce qui est permis par la loi, fournit leurs produits « en l’état ». Les logiciels distribués par Apple, sous la marque Apple ou non, (y compris, de façon non limitative, les logiciels de système) ne sont pas couverts par cette garantie. Nous vous prions de bien vouloir vous reporter au contrat de licence accompagnant le logiciel pour les détails de vos droits concernant son utilisation. Apple ne garantit pas que le fonctionnement du Produit Apple sera ininterrompu ou sans erreur. Apple n’est pas responsable des dommages provenant du non-respect des instructions d’utilisation du produit. Cette garantie ne s’applique pas : (a) aux pièces consommables, telles que les batteries ou les revêtements de protection qui par nature se consument ou se dégradent au fil du temps, sauf si le dommage est dû à un vice de matière ou de fabrication ; (b) à tout dommage esthétique, comprenant notamment toute rayure, bosse ou élément en plastique de ports cassé ; (c) à tout dommage causé par l’utilisation avec un autre produit ; (d) à tout dommage causé par accident, abus, mauvaise utilisation, contact avec des éléments liquides, feu, tremblement de terre ou autres causes extérieures ; (e) à tout dommage causé par une utilisation du Produit Apple non conforme aux instructions diffusées par Apple ; (f) à tout dommage causé par toute intervention (y compris les mises à niveau et les extensions) effectuée par toute personne qui n’est pas un représentant d’Apple ou un prestataire de services agréé Apple («PSAA»); (g) à un Produit Apple qui a été modifié de telle manière à en altérer les fonctionnalités ou les capacités sans l’autorisation écrite d’Apple ; (h) aux défauts causés par une usure normale ou dus au vieillissement normal du produit ; ou (i) si un numéro de série Apple a été enlevé du Produit Apple ou rendu illisible. RESTRICTION IMPORTANTE Apple peut restreindre le service de garantie au pays dans lequel Apple ou ses distributeurs agréés ont vendus le Produit Apple à l’origine. VOS RESPONSABILITES NOUS VOUS RECOMMANDONS D’EFFECTUER DES COPIES DE SAUVEGARDE PERIODIQUES DES INFORMATIONS CONTENUES SUR LE SUPPORT DE STOCKAGE DU PRODUIT APPLE AFIN D’EN PROTEGER LE CONTENU ET DE VOUS PREMUNIR CONTRE D’EVENTUELLES DEFAILLANCES DE FONCTIONNEMENT. Avant de pouvoir bénéficier du service de garantie, Apple ou ses représentants peuvent vous demander de fournir une preuve d’achat, de répondre à des questions dans le but de les assister à diagnostiquer les problèmes potentiels ou de suivre les procédures d’Apple pour obtenir le service de garantie. Avant de déposer votre Produit Apple pour tout service de garantie, vous vous engagez à créer une copie de sauvegarde du support de stockage, à effacer toutes les informations personnelles que vous souhaitez protéger ainsi qu’à désactiver tous vos mots de passe. IL EST POSSIBLE QUE LE CONTENU DE VOTRE SUPPORT DE STOCKAGE SOIT PERDU OU REFORMATE LORS DE LA MISE EN OEUVRE DES SERVICES DE GARANTIE. APPLE ET SES REPRESENTANTS NE SONT PAS RESPONSABLE DE LA PERTE DES LOGICIELS, DONNEES OU AUTRES INFORMATIONS CONTENUES SUR LE SUPPORT DE STOCKAGE OU TOUTE AUTRE PARTIE DU PRODUIT APPLE REMIS. Votre Produit Apple, ou un Produit Apple de remplacement, vous sera retourné configuré tel que vous l’avez acheté, sous réserve des mises à jour applicables. Apple peut installer des mises à jour du logiciel système dans le cadre de son intervention, afin qu’il ne revienne pas à une version antérieure. A la suite de ces mises à jour, les applications de tiers précédemment installées sur Les détails concernant l’obtention du service de garantie sont accessibles en ligne, grâce au lien qui figure ci-dessous. OPTIONS DU SERVICE DE GARANTIE Apple will provide warranty service through one or more of the following options: Apple fournira le service de garantie selon l’une des options suivantes : (i) Service sur place. Vous pouvez déposer votre Produit Apple dans un Magasin Apple ou chez un PSAA offrant un service sur place. Le service sera effectué sur place ou le Produit Apple pourra être envoyé par le Magasin Apple ou par le PSAA à un service de réparation Apple (“SRA”) afin d’être réparé. Une fois averti de la réparation de votre produit, vous devrez rapidement venir le récupérer auprès du Magasin Apple ou chez le PSAA, ou, le Produit Apple vous sera directement envoyé par le SRA. (ii) Service prêt à poster. Si Apple estime que votre Produit Apple peut être envoyé par courrier, Apple vous fera parvenir une enveloppe prépayée et si nécessaire, des matériaux d’emballage, afin que vous puissiez faire parvenir votre Produit Apple à un SRA ou à un PSAA, conformément aux instructions d’Apple. Une fois le service effectué, le SRA ou le PSAA vous renverra le Produit Apple. Si toutes les instructions sont suivies, Apple assumera les frais d’envoi et de retour. (iii) Service “faites-le vous-même” (“DIY”). Le service DIY vous permet de réparer vous-même votre Produit Apple. Si le service DIY est applicable compte tenu des circonstances, les procédures suivantes pourront, selon les cas, s’appliquer : (a) Service pour lequel Apple vous demande le retour du produit ou de la pièce remplacé(e). Apple pourra vous demander une autorisation de prélèvement sur votre carte de crédit pour garantir le prix au détail du produit ou de la pièce de remplacement ainsi que les coûts de transport applicables. Si vous n’êtes pas en mesure de fournir une telle autorisation, vous pourrez ne pas être en mesure d’accéder au service DIY et Apple vous proposera alors une solution alternative. Apple vous enverra le produit ou la pièce de remplacement avec, le cas échéant, les instructions pour l’installer, ainsi que les conditions de renvoi du produit ou de la pièce remplacée. Si vous suivez les instructions, Apple annulera l’autorisation de prélèvement, et vous ne supporterez pas les coûts de transport du produit ou de la pièce détachée. Si vous ne retournez pas le produit ou la pièce remplacée comme indiqué ou si le produit ou la pièce remplacée ne remplit pas les conditions permettant de bénéficier du service de garantie, Apple débitera la carte de crédit du montant autorisé. le Produit Apple peuvent ne pas être compatibles ou ne pas fonctionner avec le Produit Apple. Il vous appartiendra de réinstaller tous ces logiciels, données et informations. La récupération et la réinstallation des autres programmes de logiciels, données et informations ne sont pas couvertes par cette garantie. Important : N’ouvrez pas le Produit Apple. L’ouverture du Produit Apple est susceptible de provoquer des dommages qui ne sont pas couverts par la présente garantie. Seule Apple ou un PSAA devrait effectuer des opérations d’entretien sur le Produit Apple. QUE FERA APPLE EN CAS DE MISE EN OEUVRE DE LA GARANTIE ? Si une réclamation valable est reçue par Apple ou un PSAA pendant la Durée de la Garantie, Apple va, à son choix (i) réparer le Produit Apple en utilisant des pièces neuves ou des pièces dont les performances et la fiabilité sont équivalentes à celles d’une pièce neuve, ou (ii) échanger le Produit Apple avec un produit qui est au moins fonctionnellement équivalent au produit d’origine et qui est constitué de plusieurs pièces neuves ou de pièces dont les performances et la fiabilité sont équivalentes, ou (iii) rembourser le prix d’achat du Produit Apple. Apple pourra vous demander de remplacer certaines pièces ou certains produits pouvant être installés par l’utilisateur. Un produit ou une pièce de rechange, y compris une pièce pouvant être installée par l’utilisateur et qui aura été installée conformément aux instructions fournies par Apple, sera garantie pour la plus longue des durées suivantes : la durée restant à courir de la garantie du Produit Apple d’origine ou une durée de quatre-vingt dix (90) jours à compter de la date du remplacement ou de la réparation. Lorsqu’un produit ou une pièce est échangé(e) ou remboursé(e), toute pièce de rechange devient votre propriété et la pièce échangée ou remboursée devient la propriété d’Apple. COMMENT OBTENIR LE SERVICE DE GARANTIE? Nous vous prions de bien vouloir accéder à, et examiner les ressources d’assistance en ligne, décrites ci-dessous avant de solliciter un service de garantie. Si le Produit Apple ne fonctionne toujours pas correctement après avoir utilisé ces ressources, vous pouvez contacter un représentant Apple ou le cas échéant, un magasin propriété d’Apple (“Magasin Apple”) ou un PSAA, en utilisant les informations fournies ci-dessous. Un représentant Apple ou un PSAA vous aidera à déterminer si votre Produit Apple nécessite l’intervention d’Apple, et le cas échéant, vous informera sur les modalités de cette intervention. Des surtaxes peuvent s’appliquer, selon votre localisation, lorsque vous contacter Apple par téléphone.OU DE REPRODUCTION DE TOUT PROGRAMME OU DE TOUTE DONNEE STOCKEE OU UTILISEE AVEC LES PRODUITS APPLE ET TOUT ECHEC DANS LA PRESERVATION DE LA CONFIDENTIALITE DES DONNEES STOCKEES DANS LE PRODUIT APPLE. LA PRESENTE LIMITATION NE S’APPLIQUE PAS AUX RECLAMATIONS EN CAS DE DECES OU DE DOMMAGES CORPORELS OU EN CAS DE RESPONSABILITÉ LÉGALE POUR DOL OU FAUTE LOURDE ET/OU OMISSION. APPLE NE DONNE AUCUNE GARANTIE QUANT A SA CAPACITE A REPARER TOUT PRODUIT APPLE AUX TERMES DE LA PRESENTE GARANTIE NI A ECHANGER TOUT PRODUIT APPLE SANS AUCUN RISQUE NI AUCUNE PERTE DE PROGRAMME OU DE DONNEES. CERTAINS PAYS REGIONS, OU ETATS NE PERMETTENT PAS L’EXCLUSION OU LA LIMITATION DE RESPONSABILITE VIS-A-VIS DE CERTAINES CATEGORIES D’ACHETEURS TELS LES CONSOMMATEURS, DE TELLE SORTE QUE CERTAINES EXCLUSIONS ET LIMITATIONS PREVUES CI-DESSUS PEUVENT NE PAS S’APPLIQUER A VOUS. Nonobstant les stipulations de la présente garantie commerciale, Apple reste en toute hypothèse tenue, vis-à-vis des consommateurs, des défauts de conformité, dans les conditions prévues aux articles L. 211-1 et suivants du code de la consommation français et des vices rédhibitoires, dans les conditions prévues aux articles 1641 à 1649 du code civil français. Conformément aux dispositions de l’article L. 211-15 du code de la consommation français, les articles suivants s’appliquent aux consommateurs : Article L. 211-4 du code de la consommation français « Le vendeur est tenu de livrer un bien conforme au contrat et répond des défauts de conformité existant lors de la délivrance. Il répond également des défauts de conformité résultant de l’emballage, des instructions de montage ou de l’installation lorsque celle-ci a été mise à sa charge par le contrat ou a été réalisée sous sa responsabilité. » Article L. 211-5 du code de la consommation français « Pour être conforme au contrat, le bien doit : 1° Etre propre à l’usage habituellement attendu d’un bien semblable et, le cas échéant :  correspondre à la description donnée par le vendeur et posséder les qualités que celui-ci a présentées à l’acheteur sous forme d’échantillon ou de modèle ;  présenter les qualités qu’un acheteur peut légitimement attendre eu égard aux déclarations publiques faites par le vendeur, par le producteur ou par son représentant, notamment dans la publicité ou l’étiquetage ; (b) Service pour lequel Apple ne vous demande pas le retour du produit ou de la pièce remplacé(e). Apple vous enverra gratuitement une pièce ou un produit de remplacement avec, le cas échéant, les instructions d’installation, ainsi que toutes les conditions pour le traitement du produit ou de la pièce remplacé(e). (c) Apple n’est responsable d’aucun coût de main d’œuvre que vous pourriez supporter en relation avec le service DIY. Si vous avez besoin d’une assistance particulière, merci de bien vouloir contacter Apple au numéro de téléphone indiqué ci-dessous. Apple se réserve le droit de modifier les moyens par lesquels Apple pourrait vous fournir le service de garantie ainsi que l’éligibilité de votre Produit Apple à une méthode de service en particulier. Le service de garantie sera limité aux options disponibles dans le pays où le service est demandé. Les options du service, la disponibilité des pièces et les délais de traitement varient en fonction des pays. Vous pourrez être tenu de payer les frais d’expédition et de transport si le Produit Apple ne peut pas être réparé dans le pays dans lequel il se trouve. Si vous demandez à bénéficier du service dans un pays qui n’est pas le pays d’achat, vous devrez vous conformer à toutes les lois applicables relatives à l’importation et à l’exportation et serez redevable des droits de douane, de la TVA et toutes autres taxes et coûts associés. En ce qui concerne les services internationaux, Apple peut réparer ou échanger les produits ou les pièces par des produits ou pièces comparables conformes aux standards locaux. LIMITATION DE RESPONSABILITE A L’EXCEPTION DE CE QUI EST PREVU DANS LA PRESENTE GARANTIE COMMERCIALE ET DANS LA MESURE AUTORISEE PAR LA LOI, APPLE N’EST PAS RESPONSABLE DES DOMMAGES DIRECTS, SPÉCIFIQUES, ACCESSOIRES OU INDIRECTS, CONSECUTIFS OU NON, RESULTANT DE LA VIOLATION DE TOUTE GARANTIE OU RESPONSABILITE OU DE TOUT AUTRE CONCEPT JURIDIQUE, Y COMPRIS DE FACON NON LIMITATIVE TOUTE PERTE D’UTILISATION, PERTE DE REVENU, PERTE DE PROFITS REELS OU ANTICIPES (Y COMPRIS TOUTE PERTE DE PROFITS LIES A DES CONTRATS), PERTE DE DISPONIBILITE FINANCIERE, PERTE D’ECONOMIES PREVUES, PERTE D’AFFAIRES, PERTE D’OPPORTUNITES, PERTE DE CLIENTELE, DOMMAGE A LA REPUTATION, PERTE, DOMMAGE A, OU ENDOMMAGEMENT DE DONNEES, OU PERTE OU DOMMAGE INDIRECT OU CONSECUTIF, QUELLE QU’EN SOIT LA CAUSE, Y COMPRIS LE REMPLACEMENT DE MATERIELS OU DE BIENS, TOUS FRAIS DE RECUPERATION, DE PROGRAMMATION INFORMATION EN LIGNE De plus amples informations sont disponibles en ligne sur les sujets suivants : Information internationales de support www.apple.com/support/country Distributeurs agréés www.apple.com/buy Prestataire de Service Agréé Apple support.apple.com/kb/HT1434 Magasins Apple (“Apple Retail Store”) www.apple.com/retail/storelist/ Support et service Apple support.apple.com/kb/HE57 Support gratuit Apple www.apple.com/ support/country/index. html?dest=complimentary Societe Apple Garante Pour La Région Ou Le Pays D’achat Région/ Pays d’achat Adresse AMÉRIQUE Brésil Apple Computer Brasil Ltda Av. Cidade Jardim 400, 2 Andar, Sao Paulo, SP Brasil 01454-901 Canada Apple Canada Inc. 7495 Birchmount Rd. Markham, Ontario L3R 5G2 Canada Mexique APPLE OPERATIONS MÉXICO S.A. DE C.V. Prolongación Paseo de la Reforma #600, Suite 132, Colonia Peña Blanca, Santa Fé, Delegación Álvaro Obregón, México D. F., CP 01210, México Etats-Unis et autres pays d’Amérique Apple Inc. 1 Infinite Loop; Cupertino, CA 95014, U.S.A. EUROPE, MOYEN-ORIENT ET AFRIQUE Tous les pays Apple Sales International Hollyhill Industrial Estate Hollyhill, Cork, Republic of Ireland 2° Ou présenter les caractéristiques définies d’un commun accord par les parties ou être propre à tout usage spécial recherché par l’acheteur, porté à la connaissance du vendeur et que ce dernier a accepté. » Article L. 211-12 du code de la consommation français « L’action résultant du défaut de conformité se prescrit par deux ans à compter de la délivrance du bien. » Article 1641 du code civil français « Le vendeur est tenu de la garantie à raison des défauts cachés de la chose vendue qui la rendent impropre à l’usage auquel on la destine, ou qui diminuent tellement cet usage que l’acheteur ne l’aurait pas acquise, ou n’en aurait donné qu’un moindre prix, s’il les avait connus.» Article 1648 alinéa 1er du code civil français « L’action résultant des vices rédhibitoires doit être intentée par l’acquéreur dans un délai de deux ans à compter de la découverte du vice. » RESPECT DE LA VIE PRIVEE Apple, en sa qualité de responsable de traitement, conservera et utilisera les informations du client conformément à la politique de confidentialité Apple, qui peut être consultée sur la page web suivante: www.apple.com/legal/ warranty/privacy. STIPULATIONS GENERALES Aucun revendeur, agent ou salarié Apple n’est habilité à modifier, proroger ou compléter la présente garantie. Si une stipulation des présentes est déclarée illégale ou inapplicable, la validité des autres stipulations ne sera pas affectée. Cette garantie est régie et interprétée selon les lois du pays dans lequel le Produit Apple a été acheté. Apple est identifiée à la fin de ce document selon le pays dans lequel le Produit Apple a été acheté. Apple et ses successeurs sont les garants en vertu de cette garantie.Région/ Pays d’achat Adresse ASIE/PACIFIQUE Australie ; Nouvelle Zélande, Fidji, PapouasieNouvelle- Guinée ; Vanuatu Apple Pty. Limited PO Box A2629, South Sydney, NSW 1235, Australia Hong Kong Apple Asia Limited 2401 Tower One, Times Square, Causeway, Hong Kong Inde Apple India Private Ltd. 19th Floor, Concorde Tower C, UB City No 24, Vittal Mallya Road, Bangalore 560-001, India Japon Apple Japan, Inc. 3-20-2 Nishishinjuku, Shinjuku-ku, Tokyo, Japan Corée Apple Korea Ltd. 3201, ASEM Tower;159, Samsung-dong, Kangnam-gu; Seoul 135-090, Korea Afghanistan, Bangladesh, Bhoutan, Brunei, Cambodge Guam, Indonésie, Laos, Singapour, Malaisie, Népal, Pakistan, Philippines, Sri Lanka, Vietnam Apple South Asia Pte. Ltd. 7 Ang Mo Kio Street 64; Singapore 569086 République populaire de Chine Apple Computer Trading (Shanghai) Co. Ltd. Room 1815, No. 1 Jilong Road, Waigaoqiao Free Trade Zone, Shanghai 200131 China Thaïlande Apple South Asia (Thailand) Limited 25th Floor, Suite B2, Siam Tower, 989 Rama 1 Road, Pataumwan, Bangkok, 10330 Taiwan Apple Asia LLC 16A, No. 333 Tun Hwa S. Road. Sec. 2, Taipei, Taiwan 106 Autres pays d’Asie Pacifique Apple Inc. 1 Infinite Loop Cupertino, CA 95014, U.S.A. iPad Warranty v3.0© 2012 Apple Inc. Tous droits réservés. Apple, le logo Apple, iPad, iTunes et Safari sont des marques d’Apple Inc. déposées aux États-Unis et dans d’autres pays. Apple Store est une marque de service d’Apple Inc. déposée aux États-Unis et dans d’autres pays. La marque et les logos Bluetooth® sont des marques déposées de Bluetooth SIG, Inc. dont l’utilisation par Apple Inc. est soumise à un accord de licence. F034-6327-A Printed in XXXX Xsan 2 Administrator Guide for Xsan 2.3KApple Inc. © 2011 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. 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 408-996-1010 www.apple.com Apple, the Apple logo, Mac, the Mac logo, Macintosh, Mac OS, and Xsan are trademarks of Apple Inc., registered in the U.S. and other countries. Apple Remote Desktop, Finder, and Spotlight are trademarks of Apple Inc. StorNext is a registered trademark of Quantum Corporation. AIX is a trademark of IBM Corp., registered in the U.S. and other countries, and is being used under license. UNIX is a registered trademark of The Open Group. 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. Simultaneously published in the United States and Canada. 019-2098/2011-06-3011 Preface: About this book 12 What’s new in Xsan 2 13 Version compatibility 13 Upgrade from an earlier version of Xsan 13 More information 14 Notation conventions 15 Chapter 1: Quick SAN setup 15 Is this chapter right for you? 16 Equipment you’ll need 16 What you need to know 17 SAN setup instructions 18 Step 1: Unpack and install the SAN hardware 18 Step 2: Connect the SAN networks 18 Step 3: Set up the client computers 21 Step 4: Set up the standby metadata controller 21 Step 5: Set up the RAID systems 22 Step 6: Create a metadata array 22 Step 7: Set Up the primary metadata controller 23 Step 8: Configure the SAN 27 Step 9: Create a SAN volume 29 Step 10: Add users and groups 30 What’s next? 31 Chapter 2: Overview of Xsan 32 Xsan SANs 33 Shared SAN volumes 33 Metadata controllers 33 Clients 33 Network connections 34 How Xsan storage is organized 34 LUNs 35 Storage pools 3 Contents4 Contents 35 Affinities and affinity tags 36 Volumes 36 Folders with affinities 37 How Xsan uses available storage 37 Metadata and journal data 37 Stripe at a higher level 38 Security 38 Expand storage 38 Xsan capacities 40 Chapter 3: Plan a SAN 40 Hardware and software requirements 40 Supported computers 41 Supported storage devices 41 Fibre Channel fabric 42 Ethernet TCP/IP network 43 Directory services 44 Outgoing mail service 44 Plan your SAN 45 Preliminary planning questions 45 Planning considerations and guidelines 51 Plan the Ethernet TCP/IP network 52 Use a private metadata network 52 Use switches instead of hubs 52 Plan the Fibre Channel network 52 Verify base Fibre Channel performance 52 If your Fibre Channel fabric is running slowly 53 Configure RAID systems 53 Install the latest firmware 54 Connect RAID systems to an Ethernet network 54 Choose RAID levels for LUNs 54 Adjust RAID system performance settings 56 Chapter 4: Set up a SAN 56 Connect computers and storage devices 56 Prepare LUNs 57 Use the server setup assistant to configure controllers 57 Manage users and groups with Xsan Admin 57 Use an existing Open Directory server 58 Use another directory server 58 Use Xsan Admin 58 Connect through a firewall 58 Xsan Admin preferencesContents 5 58 Get help 58 SAN and volume setup summary 59 Set up an Xsan volume on a SAN 59 Step 1: Set up the Fibre Channel network 59 Step 2: Set up the Ethernet networks 60 Step 3: Configure SAN computers to use a time server 61 Step 4: Set up SAN users and groups 62 Step 5: Set up RAID systems 62 Step 6: Create a metadata array 63 Step 7: Enable Xsan on clients and controllers 64 Step 8: Configure the SAN 65 Step 9: Create a volume 68 Step 10: (Optional) Set up SAN status notifications 68 Step 11: (Optional) Assign folders to affinity tags 68 Step 12: (Optional) Set user and group quotas 68 Use an Xsan administrator computer 69 Rename a SAN 69 Set up another SAN 69 Manage multiple SANs 70 Destroy a SAN 71 Chapter 5: Manage SAN storage 71 Add storage 72 Prepare LUNs 72 Find the drive modules that belong to a LUN 73 Add a volume to a SAN 74 Add a storage pool to a volume 75 Add LUNs to an affinity tag 77 Rearrange Fibre Channel connections 77 Set up a folder affinity 78 Change a folder’s affinity 79 Remove an affinity 79 Change advanced volume settings 80 Set the block allocation size 80 Change the volume allocation strategy 81 Enable or disable Spotlight on a volume 81 Enable extended attributes 82 Enable or disable access control lists 82 Change filename case sensitivity 83 Change the Windows ID mapping 83 Change advanced allocation and cache settings 83 Change storage pool settings 84 Change the exclusivity of an affinity tag6 Contents 84 Set the storage pool stripe breadth 84 Maintain SAN volumes 85 Rename a volume 85 Check volume fragmentation 85 Defragment a volume 86 Check the integrity of a volume 87 Repair a volume 88 Check RAID devices 88 Destroy a volume 89 Chapter 6: Manage clients and users 89 Add a client 91 Add an Xsan serial number 91 Move a client to a different SAN 92 Mount a volume on a client 93 Change mount options 93 Manage users and groups 94 Add SAN users 95 Delete SAN users 95 Create groups 96 Delete groups 96 Change group membership 96 Configure local home folders for network accounts 97 Control client and user access 97 Control file and folder access using the Finder 97 Control file and folder access using Xsan Admin 98 Unmount a volume on a client 99 Remove a client from a SAN 100 Map Windows user and group IDs 100 Set SAN user and group quotas 102 About Xsan quotas 103 Check user quota status 104 Help users check quotas 105 Manage client computers remotely 105 Control a client using screen sharing 106 Connect to a client using SSH in terminal 107 Chapter 7: Manage metadata controllers 109 Set controller failover priority 109 Switch to a standby metadata controller 110 Find out which controller is hosting a volume 110 List the volumes hosted by a controller 111 Change a controller’s IP addressContents 7 112 Make a standby controller the primary controller 112 Convert a controller to a client 112 Access controller computers remotely 113 Control a controller using screen sharing 113 Connect to a controller using SSH in Terminal 114 Monitor controller status 115 Chapter 8: Monitor SAN status 115 Check SAN status 116 Check volume status 116 Monitor RAID devices 117 Check free space 118 Graph SAN resource usage 119 Set up status notifications 120 View Xsan logs 121 Check volume clients 122 Chapter 9: Solve SAN problems 122 If you can’t connect to a computer using Xsan Admin 122 If you can’t enable or install the Xsan software 122 If computers aren’t listed in Xsan Admin 123 If you can’t mount a volume on a client 123 If you can’t unmount a volume on a client 123 If RAID LUNs aren’t accessible over Fibre Channel 123 If you have problems using command-line tools 123 If a LUN doesn’t have as much space as expected 123 If you can’t rename an Xsan volume in the Finder 124 If you can’t add a storage pool 124 If Fibre Channel performance is poor 124 If a client can’t use a volume after a Fibre Channel interruption 125 If you can’t add LUNs to a storage pool 125 If the capacity of a larger LUN is Listed as 2 terabytes 125 If file copying doesn’t finish 126 If a volume unexpectedly restarts 127 Appendix A : Upgrade to Xsan 2.3 127 Before you begin 127 If you’re not running Xsan 2.0 or later 127 Lion or Lion Server? 127 Which procedure? 128 Version compatibility 128 Upgrade your SAN software 128 Step 1: Back up your SAN volumes8 Contents 128 Step 2: Disable Spotlight on all volumes 129 Step 3: Upgrade the primary controller to Mac OS X Lion Server 129 Step 4: Upgrade the remaining controllers 130 Step 5: Reestablish Open Directory replicas 130 Step 6: Upgrade the SAN clients 131 Step 7: Enable extended attributes 131 Step 8: Change filename case sensitivity 132 Step 9: Reenable Spotlight 132 Upgrade SAN hardware and software 133 Step 1: Back up your SAN volumes 133 Step 2: Disable Spotlight on all volumes 133 Step 3: Adjust volume failover priorities 133 Step 4: Convert all standby controllers to clients 134 Step 5: Unmount and stop all volumes 134 Step 6: Connect new Macs to the SAN 134 Step 7: Migrate the primary metadata controller 135 Step 8: Migrate former standby controllers 136 Step 9: Convert clients to standby controllers 136 Step 10: Migrate or upgrade SAN clients 138 Step 11: Enable extended attributes 138 Step 12: Change filename case sensitivity 139 Step 13: Reenable Spotlight 139 Step 14: Recreate your MultiSAN configuration 140 Appendix B: Combine Xsan controllers and StorNext clients 140 Compatible software versions 140 Terminology 141 License 141 Add StorNext clients to an Xsan SAN 142 Appendix C: Use command-line tools 142 Use shell commands 142 Send commands to remote computers 143 View the man pages 143 Notation conventions 143 Install Xsan from the command line 145 Xsan commands 145 View or change volume and storage pool settings (cvadmin) 149 Manipulate affinity tags (cvaffinity) 149 Copy files or folders (cvcp) 150 Check or repair a volume (cvfsck) 151 Label, list, and unlabel LUNs (cvlabel) 152 Create a folder and assign an affinity (cvmkdir)Contents 9 153 Create and preallocate a file (cvmkfile) 153 Initialize a volume (cvmkfs) 154 Apply volume configuration changes (cvupdatefs) 154 Defragment a file, folder, or volume (snfsdefrag) 156 Control the Xsan file system (xsanctl) 157 Mount an Xsan volume 157 Unmount an Xsan volume 158 View logs 158 Xsan configuration files 159 Glossary 162 Index11 Use this guide to learn how to use Xsan 2 to set up and manage volumes on a storage area network. This guide shows how to use Xsan 2 to combine RAID arrays into large, easy-to-expand volumes of storage that clients use like local disks, but which are actually shared over a high-speed Fibre Channel fabric. The guide is updated for Xsan 2 version 2.3 and contains the following sections.  Chapter 1,“Quick SAN setup,” has instructions for setting up a storage area network (SAN) for the first time using new computers with Mac OS X Lion or Lion Server, new RAID systems, and a default SAN configuration.  Chapter 2,“Overview of Xsan,” provides an overview of Xsan and how you can use it to organize RAID arrays into shared volumes of storage.  Chapter 3,“Plan a SAN,” describes hardware and software requirements, and offers SAN planning guidelines.  Chapter 4,“Set up a SAN,” shows the basic steps for setting up a SAN.  Chapter 5,“Manage SAN storage,” contains instructions for expanding storage, creating folders with affinities, changing volume and storage pool settings, and checking, defragmenting, and repairing SAN volumes.  Chapter 6,“Manage clients and users,” shows how to add client computers to a SAN, mount volumes on clients, control client and user access to SAN files, and control user space through quotas.  Chapter 7,“Manage metadata controllers,” contains information about managing volume metadata controllers.  Chapter 8,“Monitor SAN status,” shows how to monitor and automatically report the condition of a SAN.  Chapter 9,“Solve SAN problems,” lists solutions to common problems you might encounter.  Appendix A,“Upgrade to Xsan 2.3,” explains how to upgrade from earlier versions of Xsan. Preface About this book12 Preface About this book  Appendix B,“Combine Xsan controllers and StorNext clients,” contains information to help you use Xsan metadata controllers with Quantum StorNext clients.  Appendix C,“Use command-line tools” describes command-line tools and configuration files you can use to manage an Xsan SAN from the Terminal app. What’s new in Xsan 2 Xsan 2 offers these new features and capabilities:  The Xsan Admin app is redesigned to simplify SAN management.  Xsan Admin enables you to turn on drive activity lights to identify LUNs.  A volume setup assistant guides you through the process of creating volumes for common purposes such as video editing and file services.  The volume setup assistant also organizes available storage into storage pools for you, based on the way you plan to use the volume.  More than one storage pool can have the same affinity tag.  Each volume has a separate failover priority.  The Xsan file system supports extended attributes for Macs with Xsan 2.3 or Xsan 2.2. Volumes created with Xsan 2.3 use extended attributes by default.  Xsan 2.3: The Xsan file system is built into Mac OS X Lion. Any Mac that has Lion and the requisite Ethernet and Fibre Channel connections can access Xsan volumes.  Xsan 2.3: Mac OS X Lion includes an Xsan pane in System Preferences. It lets users with administrator accounts on their computers enable and disable the Xsan file system, mount and unmount Xsan volumes, and see basic SAN information such as the SAN name and the SAN administrator name and email address.  Xsan 2.3: Mac OS X Lion includes support for the Asymmetric Logical Unit Access (ALUA) standard for multipathing and failover. Support for this standard multipathing implementation allows Xsan to be used with a variety of Fibre Channel RAID storage arrays.  Xsan 2.3: An Xsan 2.3 SAN can also include client computers that have Mac OS X or Mac OS X Server version 10.6 Snow Leopard and Xsan 2.2.1 installed.  Xsan 2.3: For improved performance and simplicity, you can now have Xsan volumes that aren’t case sensitive. These volumes, like traditional Mac volumes, do not distinguish between uppercase and lowercase letters in filenames.  Xsan 2.3: An Xsan volume can have a separate storage pool for journal data, which may improve performance.Preface About this book 13 Version compatibility The following table shows the compatibility of Xsan 2.3 metadata controllers and clients with earlier Xsan versions and with StorNext controllers and clients. For the latest information about compatibility with StorNext controllers and clients, see the AppleCare Support article at support.apple.com/kb/HT1517. Controller Client Compatible Xsan 2.3 Xsan 2.3 Yes Xsan 2.2.1 with Mac OS X or Mac OS X Server v10.6 Snow Leopard Yes Xsan 2.2.1 with Mac OS X v10.5 Leopard or Mac OS X Server v10.5 Leopard No Xsan 2.2 or earlier No Upgrade from an earlier version of Xsan For information about upgrading your SAN storage to Xsan 2.3 from Xsan 2.2.1—including precautions to take before upgrading and tips for upgrading with the least impact on existing storage—see Appendix A,“Upgrade to Xsan 2.3.” More information For more information about Xsan, consult these resources: Xsan website (www.apple.com/xsan/) Get information about planning for, installing, setting up, and upgrading to Xsan 2.3. Xsan Support website (www.apple.com/support/xsan/) Find articles about Xsan from Apple’s support organization. Apple Discussions website (discussions.apple.com) Join a discussion group to share questions, knowledge, and advice with other Xsan administrators. Apple Training and Certification website (training.apple.com) Find instructor-led and self-paced courses for improving your Xsan administration skills. Apple Mailing Lists website (www.lists.apple.com) Subscribe to mailing lists so you can communicate with other Xsan administrators by email.14 Preface About this book Notation conventions The following conventions are used in this book where command-line tools are described. Notation Indicates fixed-width font A command or other text entered in a Terminal window $ A shell prompt [text_in_brackets] An optional parameter (one|other) Alternative parameters (enter one or the other) italicized A parameter you must replace with a value [...] A parameter that can be repeated A displayed value that depends on your SAN configuration15 Follow the instructions in this chapter to set up a volume on a storage area network (SAN) using Xsan 2. Is this chapter right for you? To keep setup instructions simple, this chapter assumes:  You’re setting up a SAN for the first time using new computers and RAID systems.  Your SAN computers are running Mac OS X Lion or Lion Server.  You’ll let Xsan set up a SAN directory service on your metadata controllers.  You’ll use the Xsan Admin app to create SAN user accounts.  You’ll choose a standard SAN volume type and let Xsan organize your storage pools.  You’ll let the Xsan setup assistant configure your private metadata network settings. To reuse existing computers while following this chapter, perform a clean installation of Mac OS X Lion or Lion Server on each computer before you begin. You can add more SAN clients after setting up your SAN, including clients that have Mac OS X or Mac OS X Server version 10.6 Snow Leopard. For information, see “Add a client” on page 89. If you want more control over the underlying organization of your SAN volumes or directory services, you can find more general instructions in the next three chapters. If you already have a SAN that you want to upgrade, you’ll find instructions in Appendix A,“Upgrade to Xsan 2.3.” 1 Quick SAN setupEquipment you’ll need To set up a new SAN using the instructions in this chapter, you need:  Fibre Channel RAID storage devices for SAN storage  Two computers that have Mac OS X Lion Server to act as SAN metadata controllers  One or more SAN client computers that have Mac OS X Lion or Lion Server  An Intel processor and at least 2 GB of RAM in each SAN computer  An additional 2 GB of RAM per SAN volume in each metadata controller  Two Ethernet ports for each SAN computer  An Apple Fibre Channel card or other Fibre Channel adapter for each SAN computer  A Fibre Channel switch and cables for all storage devices and computers  An Ethernet switch and cables for the private SAN metadata network  A second Ethernet switch and cables for public intranet and Internet access  An equipment rack if your RAID storage systems, SAN computers, or switches are designed to mount in one A list of qualified RAID systems and Fibre Channel switches is available on the Xsan website at www.apple.com/xsan/. What you need to know You need to provide the following information when you set up your SAN:  A static (fixed) public IP address, subnet mask, router address, and DNS server address for each computer on the SAN. You can enter this information manually or configure a DHCP server to provide it. If you want the DHCP server to provide IP addresses, be sure it always assigns the same IP address to each SAN computer.  A single user name and password for the administrator account on all SAN computers.  A user name and password for each user who will log in to a client computer.  A unique name for each computer (recommended) 16 Chapter 1 Quick SAN setupChapter 1 Quick SAN setup 17 The following illustration shows the hardware components of an Xsan SAN. Metadata controller Clients Standby controller Metadata RAID array (LUN) Fibre Channel switch Ethernet (public) Ethernet (private) Intranet/ Internet RAID arrays (LUNs) Ethernet switches SAN setup instructions Use the instructions on the following pages to set up your SAN for the first time. Summary 1 Unpack and Install the SAN Hardware 2 Connect the SAN Networks 3 Set Up the Client Computers 4 Set Up the Standby Metadata Controller 5 Set Up the RAID Systems 6 Create a Metadata Array 7 Set Up the Primary Metadata Controller 8 Configure the SAN 9 Create a SAN VolumeStep 1: Unpack and install the SAN hardware To install the components of your SAN, follow the instructions that come with each computer, RAID storage system, and switch. Don’t turn on any equipment until instructed to do so. Install the hardware: 1 Unpack each computer that will be part of the SAN. 2 If you need to install Fibre Channel or Ethernet cards or adapters for any of the computers, follow the instructions that come with the computer to install the card or adapter. 3 Unpack the RAID systems used for SAN storage and follow the instructions that come with the systems to install them in a rack. 4 Unpack and install the Fibre Channel switch, following the instructions that come with the switch. 5 Unpack and install the Ethernet switches for the SAN’s private metadata network and public intranet or Internet connections. Step 2: Connect the SAN networks Set up your switches and use Fibre Channel and Ethernet cables to connect the SAN computers and storage devices to the Fibre Channel and Ethernet switches. Connect the SAN networks: 1 Turn on the Fibre Channel switch and follow the manufacturer’s instructions to set it up; then connect each SAN computer to the switch using one or two Fibre Channel cables. 2 Connect the Fibre Channel ports on each RAID storage unit to the Fibre Channel switch. For details, see the instructions that come with the RAID system. 3 Turn on the Ethernet switches and connect the first Ethernet port on each SAN computer to the public Ethernet switch using an Ethernet cable. 4 Connect the second Ethernet port on each SAN computer to the private metadata Ethernet switch using a second Ethernet cable. 5 Connect the Ethernet ports on each RAID storage system to the public Ethernet switch. For details, see the instructions that come with the RAID storage system. Step 3: Set up the client computers Now you’ll go to each client computer to set up an administrator account, configure network settings, and enable the Xsan software. The procedure differs based on whether the client computer has Mac OS X Lion or Lion Server installed and ready for initial setup. 18 Chapter 1 Quick SAN setupChapter 1 Quick SAN setup 19 Use one of the next two procedures—“If a Client Has Mac OS X Lion Installed” or “If a Client Has Mac OS X Lion Server Installed”—as appropriate, with each client computer on the SAN. When you finish setting up the client computers, they’re ready to join the SAN and are detected during SAN setup. After you finish setting up client computers, go to “Step 4: Set up the standby metadata controller” on page 21. If a client has Mac OS X Lion installed: 1 Turn on the client computer. 2 Follow the Mac setup assistant’s onscreen instructions to set up the computer, paying special attention to the information in the following panes: Your Internet Connection: Choose a connection type from the pop-up menu and enter the appropriate settings for the client computer. You can choose:  Manually, and then enter the static public IP address, subnet mask, router address, and DNS server address for the client computer  Using DHCP with manual address, and then enter the client computer’s IP address if your DHCP server provides other network connection settings  Using DHCP, if your DHCP server provides the client computer with a static IP address and other connection settings Select Your Admin Account: If this pane appears, select “Create a local user account to administer this computer.” Create Your Computer Account: Enter the same administrator name and password on all computers in the SAN. 3 When the Mac setup assistant finishes and the Finder appears, choose System Preferences from the Apple menu () . 4 Click Network and select the first Ethernet port, which should be connected to your public intranet and the Internet. 5 Choose a configuration method from the pop-up menu, and then enter the appropriate settings for the client computer. You can choose:  Manually, and then enter the static public IP address, subnet mask, router address, and DNS server address for the client computer  Using DHCP with manual address, and then enter the client computer’s IP address if your DHCP server provides other network connection settings  Using DHCP, if your DHCP server provides the client computer with a static IP address and other connection settings Don’t configure the port connected to the private metadata network—the Xsan setup assistant configures it for you.6 In the Date & Time pane of System Preferences, make sure the computer is configured to set the date and time automatically using a time server. 7 In the Sharing pane of System Preferences, enter a computer name that’s different from other SAN computer names. Giving each SAN computer a unique name is optional but allows you to distinguish them in Xsan Admin. 8 In the Xsan pane of System Preferences, click Enable Xsan. The client computer can now join the SAN and is detected by the primary metadata controller during SAN setup. If the client has Mac OS X Lion Server installed: 1 Turn on the client computer. 2 Follow the server setup assistant’s onscreen instructions to set up the computer, paying special attention to the information in the following panes: Administrator Account: Enter the same account name and password on all client computers. Time Zone: Configure the computer to use a network time server, which sets the date and time automatically. Xsan: Select “Configure as Xsan Metadata Controller or Client.” Xsan Computer Type: Select “Configure as Xsan Client.” Network: Enable only the public Ethernet port (Ethernet 1 at the top of the list). Choose a configuration method from the pop-up menu and enter the appropriate settings for the client computer. You can choose:  Manually, and then enter the static public IP address, subnet mask, router address, and DNS server address for the client computer  Using DHCP with manual address, and then enter the client computer’s IP address if your DHCP server provides other network connection settings  Connecting to Your Mac: Enter a computer name that’s different from other SAN computer names. Giving each SAN computer a unique name is optional but allows you to distinguish them in Xsan Admin. Don’t configure the Ethernet port connected to the private metadata network (Ethernet 2). The Xsan setup assistant configures it for you. The client computer can now join the SAN and is detected by the primary metadata controller during SAN setup. 20 Chapter 1 Quick SAN setupChapter 1 Quick SAN setup 21 Step 4: Set up the standby metadata controller Now set up the standby metadata controller. This computer must have Mac OS X Lion Server installed but not yet set up. Set up the standby controller: 1 Turn on the computer you’re using as the standby metadata controller. 2 Follow the server setup assistant’s onscreen instructions to configure the computer, paying special attention to the settings in the following panes: Administrator Account: Enter the same account name and password that you used on your client computers. Time Zone: Configure the computer to use a network time server, which sets the date and time automatically. Xsan: Select “Configure as Xsan Metadata Controller or Client.” Xsan Computer Type: Select “Configure as Standby Xsan Metadata Controller.” Network: Enable only the public Ethernet port (Ethernet 1 at the top of the list). Choose a configuration method from the pop-up menu and enter the appropriate settings for the computer. You can choose:  Manually, and enter the static public IP address, subnet mask, router address, and DNS server address for the computer  Using DHCP with manual address, and enter the computer’s IP address if your DHCP server provides other TCP/IP connection settings The standby metadata controller can now join the SAN and is detected by the primary metadata controller during SAN setup. Step 5: Set up the RAID systems Now configure your RAID systems. Xsan sees the RAID arrays provided by the RAID systems as Fibre Channel logical unit numbers (LUNs) that can be combined to create SAN volumes. Set up the RAID systems: 1 Follow the instructions that come with your RAID systems to turn them on and configure their network, management, and security settings. 2 If your RAID systems come with RAID sets already configured, they’re detected during SAN setup, and you can skip to “Step 6: Create a metadata array” on page 22; otherwise, use the management software that comes with the RAID system to create arrays that are the same size, leaving three drives on one system unassigned so you can create a small, separate metadata LUN as described in the next step. Setup scripts for Promise RAID systems are available at www.apple.com/support/xsan/.Step 6: Create a metadata array Ten GB of disk space is enough to store the metadata for a volume containing 10 million files, so a two-drive RAID 1 (mirrored) array is generally large enough to store the metadata for your SAN volume. If you dedicate a spare drive to this array to guarantee availability, three drives are adequate for your SAN metadata. If your RAID arrays consist of four or more drives, you can follow these steps to convert an existing array into a small metadata array so you can reuse the extra drives. If you’ve set up a Promise RAID system using a script from www.apple.com/support/xsan/, you should have a two-drive RAID 1 array for metadata, and you can skip to “Step 7: Set Up the primary metadata controller”on page 22. Create a metadata array: 1 If you don’t have three spare drives, or if the drives in your RAID systems belong to RAID arrays, use the management software for your RAID system to delete an existing array. You can do this on the standby metadata controller or on a client that you’ve already set up. 2 Use two of the drives to create a two-drive RAID 1 (mirrored) array. 3 Assign a third drive as a dedicated spare for the array. You can use leftover drives from the original array to create a separate array, or save them for use as spares. You now have a new two-drive RAID 1 array for storing SAN metadata. You add this LUN to your metadata storage pool when you create your SAN volume. Step 7: Set Up the primary metadata controller Now that you’ve prepared your SAN clients, standby metadata controller, and RAID storage systems, you can set up the primary metadata controller. This computer must have Mac OS X Lion Server installed but not yet set up. Set up the primary controller: 1 Turn on the computer that will be the primary metadata controller. 2 Follow the server setup assistant’s onscreen instructions to configure the computer, paying special attention to the following panes: Administrator Account: Enter the same account name and password that you used on your client computers. Time Zone: Configure the computer to use a network time server, which sets the date and time automatically. Xsan: Select “Configure as Xsan Metadata Controller or Client.” 22 Chapter 1 Quick SAN setupChapter 1 Quick SAN setup 23 Xsan Controller Type: Select “Configure as Primary Xsan Metadata Controller.” Network: Enable only the public Ethernet port (Ethernet 1 at the top of the list). Choose a configuration method from the pop-up menu and enter the appropriate settings for the client computer. See “What you need to know” on page 16. You can choose:  Manually, and enter the static public IP address, subnet mask, and router address for the computer  Using DHCP with manual address, and enter the computer’s IP address if your DHCP server provides other TCP/IP connection settings Users and Groups: Select “Manage users and groups with Xsan Admin.” Step 8: Configure the SAN After basic server configuration and Xsan installation are complete, open Xsan Admin. The Xsan setup assistant appears. Follow these steps to enter basic SAN settings. Configure the SAN: 1 In the Introduction pane, click Continue.2 In the Initial SAN Setup pane, select “Configure new SAN.” 3 In the SAN Settings pane, enter a name for the SAN and the SAN administrator’s name and email address. 24 Chapter 1 Quick SAN setupChapter 1 Quick SAN setup 25 4 In the Add Computers pane, make sure all computers that you want to be in the SAN are selected. If a computer you want to include isn’t listed, make sure Xsan is enabled in that computer’s Xsan preferences, check that it’s connected to both Ethernet networks, and verify the network settings in the computer’s Network preferences. You can also click Add Remote Computer to add computers manually. 5 In the Authenticate SAN Computers pane, select “Use same authentication information for all SAN Computers” and enter the user account name and password for the administrator account you created on the clients and the standby metadata controller.6 In the Choose Metadata Controllers pane, select your primary and standby metadata controllers and deselect any client-only computers that appear in the list. 7 In the Private Metadata Network pane, select “Yes, manage private Ethernet network settings.” 26 Chapter 1 Quick SAN setupChapter 1 Quick SAN setup 27 8 Review the Summary pane, and if all settings are correct, click Continue. To change a setting, click Go Back until you reach the pane where you can correct the setting. Then click Continue until you return to the Summary pane. Step 9: Create a SAN volume When the Xsan setup assistant finishes basic SAN configuration, it asks if you want to create a volume. Create a volume: 1 In the “Create Volume” pane, select “Create a volume now” and click Continue.2 In the “Volume Name and Type” pane, enter a name for the volume and choose a volume type that matches the type of work the volume will support. 3 If the Label LUNs pane appears, select “Automatically label all unlabeled LUNs with prefix” and click Continue. 4 In the Configure Volume Affinities pane, drag LUNs from the left column to the corresponding affinity tag in the right column. a Drag the special metadata LUN you created (in “Step 6: Create a metadata array”) to the MetadataAndJournal affinity tag. b Drag your other LUNs to the other affinity tags. To avoid wasting storage, all LUNs assigned to an affinity tag should be the same size. c If you’re left with any affinity tags that contain no LUNs, delete them. d When you finish, click Continue. 28 Chapter 1 Quick SAN setupChapter 1 Quick SAN setup 29 5 When the Volume Failover Priority pane appears, you can change the failover order for the volume you’re creating, and then click Continue. 6 In the Setup Complete pane, click Continue. Xsan Admin displays a summary of your SAN configuration, and the new volume is mounted and ready to use in the Finder on all clients and metadata controllers. Step 10: Add users and groups When your volume is ready, the SAN setup assistant closes and Xsan Admin opens. You use Xsan Admin to add users and groups to your SAN. Add a user or group: m In Xsan Admin, select “Users and Groups” in the SAN Assets list and then click the Add button (+) in the lower right corner of the window.What’s next? Your SAN volume is now ready to use. When SAN users log in to client computers, they’ll see the volume in the Finder. For information about using and managing the SAN, see the other chapters of this guide. They cover topics such as:  Controlling access to files and folders on SAN volumes  Setting folder affinities  Managing available space with user quotas  Monitoring the status of the SAN and its volumes You can also find information about these and other tasks in the onscreen help. Open Xsan Admin and choose Help > Xsan Admin Help. 30 Chapter 1 Quick SAN setup31 Learn about storage area networks (SANs) and how Xsan helps you set one up. Read this chapter for an overview of Xsan and how you can use it to set up a SAN to provide fast, shared storage. SAN_ Volume Mac OS X Xsan lets you combine RAID arrays into volumes clients use like local disks. File data moves over Fibre Channel RAID arrays (LUNs) Storage pools 2 Overview of XsanXsan SANs A SAN is a way of connecting computers and storage devices so computers have fast, shared access to files while making it easy for administrators to expand storage capacity. An Xsan SAN consists of:  Shared data volumes  RAID systems that provide storage space that is protected from disk failure  At least one computer acting as a metadata controller that combines RAID arrays and presents their storage to clients as volumes that behave like local disks  Client computers that access storage in accordance with established permissions and quotas  Underlying Fibre Channel and Ethernet networks The following illustration shows the hardware components of an Xsan SAN. Metadata controller Clients Standby controller Metadata RAID array (LUN) Fibre Channel switch Ethernet (public) Ethernet (private) Intranet/ Internet RAID arrays (LUNs) Ethernet switches 32 Chapter 2 Overview of XsanChapter 2 Overview of Xsan 33 Shared SAN volumes A user or application on a client computer accesses shared SAN storage the way they would access a local volume. Xsan volumes are logical disks made up of pools of RAID arrays. The elements you combine to create an Xsan volume are described in “How Xsan storage is organized” on page 34. Metadata controllers When you set up an Xsan SAN, you assign at least one computer to act as the metadata controller. The controller manages volume metadata, maintains a file system journal, and controls concurrent access to files. Metadata includes such information as where files are stored and what portions of available storage are allocated to new files. To guarantee volume availability, a SAN should include more than one metadata controller, as shown in the illustration on page 32. If the primary controller fails, the standby controller takes over. Clients The computers that users or applications use to access SAN volumes are called clients. Clients exchange metadata with controllers over the private Ethernet network but use Fibre Channel to send and retrieve file data to and from the RAID systems that provide storage for the volumes. Network connections Xsan uses the following independent networks to connect storage devices, metadata controllers, and client computers: a Fibre Channel network and two Ethernet networks. Fibre Channel Xsan moves data between clients and SAN volumes over high-speed Fibre Channel connections. Controllers also use a Fibre Channel connection to move metadata to and from the volume. Xsan can take advantage of multiple Fibre Channel connections between clients and storage. Xsan can alternate between connections for each read and write, or it can assign each RAID array in a volume to a connection when the volume is mounted. Ethernet Xsan controllers and clients exchange file system metadata over a separate, private Ethernet network. (Controllers use Fibre Channel to read and write metadata on a volume.) To prevent Internet or intranet traffic from interfering with metadata communications, set up separate public (Internet) and private (metadata) Ethernet networks, as shown in the illustration on page 32.How Xsan storage is organized Although an Xsan volume mounted on a client computer looks like a single disk, it consists of multiple physical disks combined on several levels using RAID techniques. The following illustration shows an example of how disk space provided by drive modules in several RAID systems is combined into a volume that users see as a large local disk. RAID Arrays (LUNs) Data striping across LUNs Storage pools Affinity tags Folder affinities SAN volume Video Video Audio Other Metadata and journal Video Other Audio The following paragraphs describe these elements and how you combine them to create shared Xsan volumes. LUNs The smallest storage element you work with in Xsan is a logical storage device called a SCSI logical unit number, or LUN. A LUN represents a group of drives combined into a RAID array. You create a LUN when you create a RAID array on a RAID storage device. The RAID system combines physical drives into an array based on the RAID scheme you choose. Each array appears on the Fiber Channel network as a LUN. If the standard RAID arrays on your RAID systems aren’t right for your application, you can use the RAID system management software to recreate arrays based on other RAID schemes or different numbers of drive modules. For information about other RAID schemes, see “Choose RAID schemes for LUNs” on page 47. 34 Chapter 2 Overview of XsanChapter 2 Overview of Xsan 35 The illustration on page 34 shows eight LUNs. The LUN that stores metadata and journal information uses RAID level 1 (mirrored) to prevent metadata loss. One LUN stores users’ data on a RAID 0 array (striping only) for best speed and storage efficiency but no data protection. The other data LUNs use RAID 5 (distributed parity) for high performance and storage efficiency with data protection. Xsan sees the RAID arrays as LUNs that can be combined to create a volume. Your RAID LUNs are labeled and initialized for use with the Xsan file system when you use Xsan Admin to set up a volume. Storage pools LUNs are combined to form storage pools. A storage pool in a small volume might consist of a single RAID array, but a larger volume might consist of several storage pools each of which includes several arrays. Xsan distributes file data in parallel across the LUNs in a storage pool using a RAID 0 (striping) scheme. So, you can improve a client’s access speed by distributing available storage over several LUNs in a storage pool. You can set up storage pools that have different performance or recoverability characteristics based on the RAID level of their LUNs, and assign folders to them using affinities. Users can then select where to store files based on their need for speed or safety. See “Folders with affinities” on page 36. The illustration on page 34 shows eight LUNs combined into five storage pools. One pool uses a single RAID 0 array (fast, but not recoverable). Three other pools use multiple RAID 5 arrays (not as fast, but recoverable), and Xsan stripes data across the LUNs in each storage pool. You use Xsan Admin to add available LUNs to storage pools. Affinities and affinity tags An affinity associates a folder with specific storage pools. When you assign an affinity to a folder, you guarantee that files placed in the folder are stored on a storage pool that has the corresponding affinity tag. An affinity tag groups storage pools based on performance and recoverability characteristics. More than one storage pool can have the same affinity tag. Xsan distributes the contents of a folder with a specific affinity among the storage pools that have that affinity tag. This strategy improves performance when users simultaneously read and write files in the same folder, because the read and write operations are distributed among the storage pools and their component LUNs.You use Xsan Admin to assign affinity tags to storage pools and associate folders with those affinity tags. Volumes Storage pools are combined to create the volumes that users see. From the user’s perspective, the SAN volume looks and behaves like a large local disk, except that:  The size of the volume can grow as you add underlying arrays or storage pools  Multiple users on the SAN can access files on the volume at the same time In the illustration on page 34, five storage pools are combined to create a single shared volume. You use Xsan Admin to create volumes and mount them on client computers. The following screen shot shows how LUNs, storage pools, and volumes look as you organize them in Xsan Admin. This example shows a SAN with a single shared volume named “SanVol.” Storage for the volume is provided by two storage pools, “MetadataAndJournal” and “Data1,” the first based on a single LUN and the other on two LUNs. Volume Storage pool LUN Folders with affinities To control which storage pools are used to store specific files (for example, to provide different levels of service for different users or apps), you can associate a folder on an Xsan volume with an affinity tag that’s assigned to storage pools that make up the volume. 36 Chapter 2 Overview of XsanChapter 2 Overview of Xsan 37 For example, you can associate some folders with an affinity whose storage pools have faster LUNs, and associate other folders with an affinity whose storage pools have safer LUNs. Users can choose between faster and safer storage by putting files in the appropriate folder. In the illustration on page 34, the Other folder has an affinity for the faster storage pool based on a RAID 0 array. Any file that a user copies into the Other folder is stored on the faster array. The Video and Audio folders are associated with the more secure RAID 5 storage. How Xsan uses available storage Xsan stores user files and file system data on SAN volumes, and stripes data across the LUNs in a volume for better performance. Metadata and journal data Xsan records information about the files in an Xsan volume using metadata files and file system journals. File system metadata includes information such as which specific parts of which disks are used to store a file and whether the file is being accessed. The journal data includes a record of file system transactions that help ensure the integrity of files in the event of a failure. These files are managed by the Xsan metadata controller but are stored on SAN volumes, not on the controller itself. Metadata is stored on the first storage pool you add to a volume. Journal data can also be stored on the same storage pool as metadata, or you can use a separate storage pool for journal data. You must have journal data on only one storage pool. Stripe at a higher level When a RAID system writes a file using a RAID 0 (striping) scheme, it breaks the file into segments and spreads them across disk drives in the RAID array. This improves performance by writing parts of the file in parallel (instead of one part at a time) to disks in the array. Xsan applies this same technique in the storage hierarchy. Within each storage pool in a volume, Xsan stripes file data across the LUNs that make up the storage pool. Performance is improved because data is written in parallel. You can tune SAN performance to suit a critical application by adjusting the amount of data written to each LUN in a storage pool (the stripe breadth).Security There are several ways you can control access to a SAN volume:  Unmount a volume on client computers that shouldn’t have access to it. However, users who have administrator accounts on client computers with Mac OS X Lion or Lion Server can browse and mount SAN volumes.  Specify owner, group, and general access permissions in Xsan Admin.  Specify owner, group, and general access permissions in the Finder.  Control user access to files and folders on a volume, by setting up access control lists (ACLs) in Xsan Admin.  Set up zones in the underlying Fibre Channel network, to segregate users and volumes. Expand storage There are two ways you can add free space to an Xsan volume:  Add RAID systems (new LUNs) to an affinity tag  Add new storage pools to the volume Both methods unmount and remount the volume on clients, so choose a time that’s convenient for your SAN users. You can also add volumes to a SAN at any time. For information about expanding Xsan storage, see “Add storage” on page 71. Xsan capacities The following table lists limits and capacities for Xsan volumes. Parameter Maximum Number of volumes on a SAN 16 Number of storage pools in a volume 512 Number of LUNs in a storage pool 32 Number of LUNs in a volume 512 Number of files in a volume 4,294,967,296 LUN size Limited by the size of the RAID array Volume size Limited by the number and size of LUNs File size Approximately 2 63 bytes Volume name length 70 characters (A–Z, a–z, 0–9, and _ ) 38 Chapter 2 Overview of XsanChapter 2 Overview of Xsan 39 Parameter Maximum File or folder name length 251 ASCII characters Storage pool name length 255 ASCII characters Affinity name length 255 ASCII characters LUN name (label or disk name) 242 ASCII characters40 Learn Xsan hardware and software requirements and planning guidelines and performance tips to help you design a SAN for your needs. This chapter contains:  Xsan hardware and software requirements (below)  SAN planning guidelines (page 44) Hardware and software requirements Your SAN environment must satisfy requirements in these areas:  Supported computers  Supported storage devices  Fibre Channel fabric, adapters, and switches  Ethernet network  Directory services (optional)  Outgoing mail service (optional) Supported computers To join an Xsan 2.3 SAN, computers must meet the following minimum requirements. Base systems  Clients and controllers must be Macs that have Intel processors and can be connected to Fibre Channel fabric. Memory  Client computers must have at least 2 GB of RAM.  Computers used as metadata controllers must have at least 2 GB of RAM for Mac OS X Lion Server plus an additional 2 GB of RAM for each SAN volume hosted by the controller. For example, a controller should have 4 GB of RAM to host one volume, or 6 GB for two volumes. 3 Plan a SANChapter 3 Plan a SAN 41 Supported operating systems Computers with Mac OS X Lion or Lion Server can be used as Xsan 2.3 metadata controllers and clients. Mac OS X Lion Server is recommended for metadata controllers. Xsan 2.3 is included with Mac OS X Lion and Lion Server. To join an Xsan 2.3 SAN, Windows, AIX, IRIX, Linux, and Solaris clients must be running Quantum’s StorNext File System. For version compatibility information, see “Version compatibility” on page 13. Supported storage devices Use only Apple-qualified RAID systems or ALUA-compliant RAID systems for storage devices. For the latest information about qualified RAID systems, see the Xsan webpage at www.apple.com/xsan/. Important: Be sure to install the latest firmware update on your RAID systems before you use them with Xsan. Fibre Channel fabric Unlike file system metadata, which controllers and clients exchange over Ethernet, file content in an Xsan SAN is transferred over Fibre Channel connections (as is metadata that controllers access on a volume). The computers, storage devices, and switches are connected with Fibre Channel cables to form a Fibre Channel fabric. To set up the connections, you need:  An Apple Fibre Channel card or other Fibre Channel adapter for each client and controller computer  A supported Fibre Channel switch  Fibre Channel cables connecting computers and storage devices to the switches to form a Fibre Channel fabric Fibre Channel cards or adapters Install an Apple Fibre Channel PCI card or attach a Fibre Channel adapter to a compatible port of each Mac that connects to the SAN. Fibre Channel switches Fibre Channel switches from Brocade, Cisco, and QLogic have been tested with Xsan and the Apple Fibre Channel PCI, PCI-X, and PCI-E cards. For the latest information about qualified switches, see the Xsan webpage at www.apple.com/xsan/.Fabric configuration You must connect the computers, storage devices, and switches in your Fibre Channel network to form a Fibre Channel fabric. In a fabric, Fibre Channel cables connect node ports (F or N_Port). For more information about setting up your fabric, see the documentation that came with your Fibre Channel switches. Ethernet TCP/IP network Computers on the SAN must be connected to an Ethernet network. Xsan controllers and clients use this network instead of the Fibre Channel network to exchange file system metadata. If the computers on your SAN must communicate with directory servers, a corporate or campus intranet, or the Internet, connect each SAN client and metadata controller to two Ethernet networks: one private subnet for the SAN metadata and a separate connection for directory service, intranet, and Internet traffic. This is especially important if you plan to use the SAN for high-performance applications such as video editing. IP addresses The client and metadata controller computers need static (fixed) IP addresses for Ethernet network connections. For the public intranet and Internet connection, you can enter each computer’s static IP address, subnet mask, router address, and DNS server address manually or configure a DHCP server to provide this information. If you want the DHCP server to provide IP addresses, it must always assign the same static IP address to each SAN computer. Don’t use DHCP to assign dynamic IP addresses to SAN devices. For the SAN metadata network, the SAN computers should have static private (nonroutable) IP addresses (unless you can’t set up a separate, private Ethernet network for SAN metadata). If you’re setting up new computers or computers on which you’ve just installed Mac OS X Lion or Lion Server, you can have Xsan Admin assign and manage addresses for your private metadata network. If you assign addresses yourself, use one of the following ranges of IP addresses on your private (nonrouted) metadata network: Private address range Associated subnet mask Also specified as 10.0.0.0–10.255.255.255 255.0.0.0 10/8 172.16.0.0–172.31.255.255 255.240.0.0 172.16/12 192.168.0.0–192.168.255.255 255.255.0.0 192.168/16 42 Chapter 3 Plan a SANChapter 3 Plan a SAN 43 Directory services If you plan to use user and group privileges to control access to files and folders on the SAN, you should set up or join a central directory of users and groups. A central directory service lets you manage SAN users and groups from one computer instead of having to visit and painstakingly configure each SAN client and metadata controller. If directory service is provided by a Mac Open Directory server, you can have the Xsan setup assistant configure Macs in the SAN to use existing user and group accounts from the Open Directory server. If you have another type of directory service, such as Active Directory, you configure each Mac in the SAN to connect to it for user and group accounts by using the Users & Groups pane of System Preferences (the Accounts pane in Mac OS X or Mac OS X Server v10.6) after initial setup. If your SAN doesn’t have access to an existing directory service, you can specify during initial setup of your Xsan primary metadata controller that you want to use Xsan Admin to manage users and groups. The server setup assistant creates an Open Directory master server on your primary metadata controller. The Xsan setup assistant creates Open Directory replica servers on standby metadata controllers. The Open Directory master provides an LDAP directory, single sign-on user authentication using Kerberos, and password validation using common authentication methods. The replicas improve responsiveness and provide automatic failover of Open Directory services. The Xsan setup assistant also configures Mac clients in the SAN to connect to your Xsan primary metadata controller for Open Directory user and group accounts. If you use network accounts from a Mac server that isn’t an Xsan metadata controller, you don’t use Xsan Admin to manage user and group accounts. If the network accounts server (or directory server) has Mac OS X Lion Server, use the Server app to manage network user and group accounts. If the network account server has Mac OS X Server v10.6 Snow Leopard or earlier, use Workgroup Manager to manage user and group accounts. Note: Some apps running on SAN client computers, such as Final Cut Pro, work better when users have local home folders, not network home folders. User accounts that you manage with Xsan Admin are set up with local home folders. For help setting up local home folders for user accounts that you don’t manage with Xsan Admin, see “Configure local home folders for network accounts” on page 96. If you decide not to use a central directory service, you must set up the same users and groups in the Accounts pane of System Preferences on each SAN computer.Important: If you create users and groups on each SAN computer, be sure that:  Each user or group has a numeric user ID (UID) or group ID (GID) that is unique throughout the SAN  Each user or group defined on more than one computer has the same UID or GID on each computer Outgoing mail service Xsan can send SAN status notifications via email on your local network (IP subnet) without using a separate mail server. However, depending on your network configuration, you may need an SMTP server to send notifications outside your local network. If you don’t have access to an outgoing mail server, use the mail service in Mac OS X Lion Server to set one up. For information, open the Server app and search Server Help. Plan your SAN It’s easy to add storage to an Xsan SAN, but reorganizing a SAN after you set it up isn’t simple. So, it’s important to plan the layout and organization of your SAN and its storage before you set it up. An Xsan SAN is made up of:  Storage devices (RAID systems)  LUNs (SCSI logical unit numbers, usually RAID arrays)  Storage pools (groups of LUNs)  Affinity tags, which identify storage pools with similar performance and data protection  Volumes (groups of storage pools visible to users)  Clients (computers that use volumes)  Controllers (computers that manage volume metadata)  An Ethernet network used to exchange volume metadata  A Fibre Channel network used to transfer data to and from volumes Before you set up a SAN, you must decide how to organize these components. Take the time to create a diagram or a table that organizes available hardware into RAID arrays, volumes, client computers, and metadata controllers in a way that meets SAN users’ needs and your needs as the SAN administrator. You don’t need to plan storage pools or affinity tags if you set up each volume using a preset volume type based on the kind of work the volume supports. 44 Chapter 3 Plan a SANChapter 3 Plan a SAN 45 Preliminary planning questions As you plan, consider the following questions:  How much storage do you need?  How do you want to present available storage to users?  What storage organization makes the most sense for user workflow?  What levels of performance do users require?  How important is high availability?  What are your requirements for security? Your answers to the questions above will help you decide the following:  What RAID schemes should you use for your RAID arrays?  How many SAN volumes do you need?  How should individual volumes be organized?  Which preset volume type can you choose for each volume?  Which LUNs should be assigned to each affinity tag?  Which clients, users, and groups should have access to each volume?  Which computers will act as metadata controllers?  Do you need standby metadata controllers?  Do you need to adjust a volume’s allocation strategy?  How should you configure your Ethernet network? Review the considerations and guidelines on the following pages for help creating a suitable SAN design. Planning considerations and guidelines The following considerations might help improve your SAN design decisions. How much storage? Because it’s easy to add storage for user data to an Xsan SAN, you only need an adequate starting point. You can add storage later as needed. However, you can’t expand a storage pool that can only store volume metadata or journal data, so try to allocate enough space for metadata and journal data right from the start. (You can add an entire storage pool for metadata and another storage pool for journal data.) For help estimating your metadata and journal data storage requirements, see “Estimate metadata and journal data storage needs” on page 51. Note that the number of RAID systems you use affects not only available space but also SAN performance. See “Performance considerations” on page 46.How should users see available storage? If you want users working on a project to see a volume dedicated to their work, create a separate volume for each project. If it’s acceptable for a user to see a folder for his or her work on a volume with other peoples’ folders, create a single volume and organize it into project folders. Workflow considerations How much file sharing is required by your users’ workflow? For example, if different users or groups work on the same files, simultaneously or in sequence, store those files on a single volume to avoid needing to maintain or hand off copies. Xsan uses file locking to manage shared access to a single copy of the files. Performance considerations If your SAN supports an application (such as high resolution video capture and playback) that requires the fastest possible sustained data transfers, design your SAN with these performance considerations in mind:  Set up the LUNs (RAID arrays) using a RAID scheme that offers high performance. See “Choose RAID schemes for LUNs” on page 47.  Assign your fastest LUNs to an affinity tag for the application. Assign slower LUNs to an affinity tag for less demanding applications.  To increase parallelism, spread LUNs across RAID controllers. Xsan then stripes data across the LUNs and benefits from simultaneous transfers through two RAID controllers.  To increase parallelism for an affinity tag assigned to relatively small LUNs (the size of one or a few drive modules), create a slice of similar size across all drives on a RAID controller instead of creating the LUNs from one or two drive modules.  Spread file transfers across as many drives and RAID controllers as possible. Try creating slices across the drives in RAID systems, and then assign these slices to the same affinity tag.  To increase throughput, connect both ports on client Fibre Channel cards to the fabric.  Store file system metadata on a separate storage pool from user data and make sure the metadata LUNs aren’t on the same RAID controller as user data LUNs.  You can use a separate storage pool for journal data when you create a new volume. This significantly improves performance for some operations, such as creating and deleting files.  Use a second Ethernet network (including a second Ethernet port for each SAN computer) for SAN metadata.  If your SAN uses directory services, mail services, or other services on a separate server, connect SAN computers to that server on an Ethernet network separate from the SAN metadata network. 46 Chapter 3 Plan a SANChapter 3 Plan a SAN 47  Choose a different primary metadata controller for each volume, and set up volume failover priorities to minimize the possibility of more than one volume failing over to the same metadata controller.  If all computers on your SAN are Macs, enable Extended Attributes for your volumes to eliminate the overhead of file information being stored in multiple hidden files. Availability considerations If high availability is important for your data, set up at least one standby metadata controller in addition to your primary metadata controller. Also, consider setting up dual Fibre Channel connections between each client, metadata controller, and storage device using redundant Fibre Channel switches. WARNING: Losing a metadata controller without a standby can result in the loss of all data on a volume. A standby controller is strongly recommended. Security considerations If your SAN supports projects that must be secure and isolated from each other, create separate volumes for each project to eliminate any possibility of the wrong client or user accessing files stored on a volume. As the SAN administrator, you control which computers are SAN clients. Users whose computers aren’t SAN clients or controllers can’t browse for or mount SAN volumes. You use Xsan Admin to remove clients from the SAN. However, you can’t control which Xsan 2.3 computers can use a volume. Users whose SAN computers have Mac OS X Lion or Lion Server can mount all SAN volumes themselves. You can also set up access control lists (ACLs) in Xsan Admin or assign user and group permissions to folders using standard file access permissions in the Finder. Choose RAID schemes for LUNs Much of the reliability and recoverability of data on a SAN is provided not by Xsan, but by the RAID arrays you combine to create storage pools and volumes. Before you set up a SAN, use the RAID system configuration or administration software to prepare LUNs based on specific RAID schemes. WARNING: If a LUN in the metadata storage pool fails and can’t be recovered, all data on the volume is lost. It is strongly recommended that you use only redundant LUNs (LUNs based on RAID schemes other than RAID 0) to create Xsan volumes. For information about removing a failed LUN in a user data storage pool, see the AppleCare Support article at support.apple.com/kb/HT4656.LUNs configured as RAID 0 arrays (striping only) or LUNs based on single drives are difficult or impossible to recover if they fail. Unprotected LUNs such as these should be used only in storage pools that store scratch files or other data that you can afford to lose. Most RAID systems support all popular RAID levels. Each RAID scheme offers a different balance of performance, data protection, and storage efficiency, as summarized in the following table. RAID level Storage efficiency Read performance Write performance Data protection RAID 0 Highest Very High Highest No RAID 1 Low High Medium Yes RAID 3 High to very high Medium Medium Yes RAID 5 High to very high High High Yes RAID 0+1 Low High High Yes Decide on the number of volumes A volume is the largest unit of shared storage on the SAN. If users need shared access to files, store those files on the same volume. This makes it unnecessary for them to pass copies of the files among themselves. However, if security is critical, remember you can’t control client access by unmounting volumes on Xsan 2.3 clients. Users whose computers have Mac OS X Lion or Lion Server can mount SAN volumes themselves. For a typical balance of security and shared access, create one volume and control access with folder access privileges or ACLs in Xsan Admin or the Server app. Decide how to organize a volume You can help users organize data on a volume or restrict users to specific areas of the volume by creating predefined folders. You can control access to these folders by assigning access permissions using Xsan Admin. You can assign folders to specific storage pools using affinities. For example, you can create a folder for data that requires fast access and assign that folder to your fastest storage pool. Assign LUNs to affinity tags When you create a volume using a preset volume type that fits your SAN scenario, Xsan Admin sets up storage pools and affinity tags for best performance. All you do is assign LUNs to each affinity tag. Xsan Admin determines the optimal number of storage pools to create, based on the volume type and the number of LUNs you assign to each affinity tag. 48 Chapter 3 Plan a SANChapter 3 Plan a SAN 49 For best performance, assign LUNs in the multiples shown below. These multiples apply to affinity tags used for user data, not to the Metadata and Journal affinity tag, which needs one LUN. Important: Assigning LUNs other than in the multiples shown below can result in serious fragmentation. For this volume type’s affinity tags used for user data Assign LUNs in multiples of General File Server 2 Home Folder Server 2 Mail Cluster 1 Podcast Producer Cluster 4 Standard Definition Video 4 Uncompressed High Definition Video 4 Assign LUNs that have the same capacity and performance characteristics to each affinity tag. LUNs that you assign to an affinity tag should have the same capacity, because Xsan provides high performance by using the RAID 0 scheme to stripe data across the LUNs in each storage pool. This striping scheme can use available space on each LUN equal to the capacity of the smallest LUN in a storage pool. If a storage pool’s LUNs vary in size, this can result in wasted capacity. For example, if a storage pool has a 240 GB RAID array and a 360 GB RAID array, 120 GB of the larger array won’t be used. By assigning LUNs with similar capacities to an affinity tag, you avoid wasting available storage. If you’re using a volume type with multiple affinity tags for user data, assign your fastest LUNs to the affinity tag associated with folders whose contents benefit most from extra performance. Assign slower LUNs to an affinity tag associated with folders whose contents don’t have critical performance requirements. You can also increase the performance of an affinity tag’s storage pools by assigning that affinity tag a combination of LUNs that are hosted on different drive modules and different RAID controllers. This strategy increases performance by increasing the parallelism of data transfers. Decide which clients to mount a volume on If you create multiple volumes, decide which volumes should be mounted on which clients. A new volume is initially mounted on all clients. When you add a client to the SAN, volumes that are currently mounted on all SAN computers will be mounted automatically on the new client. If a volume isn’t mounted on all SAN computers, and you add a new client, the volume isn’t mounted automatically on the new client. If a volume isn’t mounted on all SAN computers but is mounted on all metadata controllers, and you add a metadata controller, the volume is mounted automatically on the new metadata controller. If you stop a volume, it isn’t mounted automatically on any SAN computers when you start the volume again. You can use Xsan Admin to mount or unmount a volume on selected clients. Users whose SAN computers have Mac OS X Lion or Lion Server can mount and unmount SAN volumes themselves using the Xsan pane of System Preferences. Choose metadata controllers You must choose at least one computer to be the SAN metadata controller, the computer that is responsible for managing file system metadata. Note: File system metadata and journal data are stored on the SAN volume, not on the metadata controller itself. For more information, see “Store user data with metadata and journal data” below. If high availability is important, use at least two metadata controllers: one as the primary controller and one as a standby. You can specify additional metadata controllers as needed, and set each volume’s failover priorities to determine the order in which the controllers are tried if a volume’s primary controller stops responding. If performance is critical, don’t run other server services on the metadata controller and don’t use the controller to reshare a SAN volume using AFP or NFS. Choose standby controllers To be sure that SAN volumes are always available, set up at least one standby metadata controller that can take over if your primary metadata controller fails. Store user data with metadata and journal data The metadata and journal data that describe a volume are stored not on the volume’s metadata controller, but on the volume. Metadata is stored on the first storage pool in the volume. Journal data can be stored on any storage pool in the volume. You must have only one storage pool with journal data. Preset volume types set up a separate storage pool used only for metadata and journal data. If you set up a custom volume with more than one storage pool, you can choose whether the metadata and journal storage pool is allowed to store user data. You might get adequate performance by combining metadata and journal data on the same storage pool as user data, but for better performance, use a separate storage pool for metadata and journal data. 50 Chapter 3 Plan a SANChapter 3 Plan a SAN 51 Estimate metadata and journal data storage needs To estimate the amount of space required for Xsan volume metadata, assume that 10 million files on a volume require approximately 10 GB of metadata on the volume’s metadata storage pool. The journal requires between 64 KB and 512 MB. Xsan configures a fixed size when you create a volume. Due to the small size, you can use a single RAID 1 LUN for the journal storage pool. To maximize the performance benefit of a separate journal storage pool, dedicate entire physical disks to the RAID 1 LUN. Choose an allocation strategy If you choose a preset volume type when you set up a volume, Xsan Admin sets its volume allocation strategy for you. Later, you can change the allocation strategy by editing volume settings with Xsan Admin. The allocation strategy you choose for a volume determines the order in which its storage pools are filled with data. You can choose round robin, fill, or balance:  If you choose round robin, Xsan writes data to each storage pool in the volume in turn. This is normally the best choice for performance.  If you choose fill, Xsan writes data to the first storage pool in the volume until that storage pool is full, and then moves to the next storage pool. This is a good choice to keep a specific storage pool unused as long as possible.  If you choose balance, Xsan writes data to the storage pool that has the most free space. Plan the Ethernet TCP/IP network Ethernet connections are used in several ways in an Xsan SAN:  Xsan clients and metadata controllers use Ethernet to exchange volume metadata.  Xsan clients can use Ethernet for access to networks outside the SAN (campus or corporate intranet or the Internet).  Xsan metadata controllers can use Ethernet connections for remote management.  RAID systems can use Ethernet connections for system management.  Fibre Channel switches can use Ethernet connections for switch management. You have two options:  Use one Ethernet network for all traffic. This is the less expensive option, but is also less secure and might not provide the best performance.  Use two separate networks—one for metadata and another for all other IP traffic. This configuration is slightly more expensive (requiring two Ethernet adapters for each computer and an additional switch) but offers greater security and better performance because routine network traffic doesn’t interfere with SAN volume metadata traffic.Use a private metadata network Non–SAN-related Ethernet traffic can interfere with the exchange of metadata among Xsan controllers and clients. For example, using the same connection for Xsan metadata exchange and Internet access can slow file system performance. Similarly, using the same Ethernet network to connect client computers to directory services and SAN metadata can affect SAN performance. If SAN performance is critical for your users or applications, keep all extraneous traffic off the network that clients and metadata controllers use to exchange metadata. For best SAN performance, set up a private Ethernet TCP/IP network for the exclusive use of Xsan clients and metadata controllers. For other types of network traffic, including Internet access, RAID system and Fibre Channel switch management, remote SAN management, or directory services, connect each client and metadata controller to a second Ethernet network using a second Ethernet port. Use switches instead of hubs To get the best performance, use Gigabit Ethernet switches, not hubs, in the SAN metadata network. Plan the Fibre Channel network Xsan uses Fibre Channel connections to:  Transfer user data between clients and data storage pools  Transfer metadata between metadata controllers and metadata storage pools If you have connections operating below the data rate supported by your equipment (typically 2 or 4 Gb/s), verify Fibre Channel performance and troubleshoot the fabric. Verify base Fibre Channel performance Because the devices connected to a Fibre Channel network adjust their speed to match the slowest device on the fabric, be sure that all connections in the fabric are operating at the expected speed (typically 2 or 4 Gb/s). Check Fibre Channel connection performance: m Use the management software provided with your Fibre Channel switches to test the performance of your Fibre Channel fabric. If your Fibre Channel fabric is running slowly If your Fibre Channel fabric isn’t running at the expected speed (typically 2 or 4 Gb/s, depending on your equipment), review the following information. 52 Chapter 3 Plan a SANChapter 3 Plan a SAN 53 Check cables One faulty cable in a fabric can slow the entire network. Check all cables to make sure they’re capable of full transmission speed. Use your switch management software to isolate the faulty cable by checking the performance of specific connections. Use qualified transceivers Check with the manufacturers of the devices you’re connecting to your fabric to be sure that the transceivers (GBICs) you’re using are qualified for use with their devices. With some Fibre Channel switches, you should use identical transceivers (same manufacturer and model number) on both ends of each cable. Mismatched optical transceivers (even if they are separately qualified for use with your devices) can cause Fibre Channel communication errors and degrade SAN performance. With Cisco Fibre Channel switches, you should use a Cisco transceiver on the end of a cable that plugs into the switch, but use another qualified transceiver at the other end of the cable. For Fibre Channel hardware compatibility information, see the AppleCare Support article at support.apple.com/kb/HT1769. Check Fibre Channel switch port configuration The Request for State Change Notifications (RSCN) that is generated when a client on the SAN restarts can cause dropped frames in video streams to other clients. To avoid interrupting SAN traffic to other clients if one client restarts, check your Fibre Channel switch documentation to see if you can configure the switch to suppress RSCNs on initiator ports. (For example, on Qlogic switches this feature is called I/O StreamGuard.) Connect devices to specific blades If your Fibre Channel switch is based on a blade architecture, you might be able to improve performance by:  Connecting pairs of devices that routinely exchange large volumes of data to the same blade in the switch  Distributing loads across multiple blades instead of concentrating all of the load on one or two blades Configure RAID systems Follow these guidelines when you set up your RAID systems for use as Xsan LUNs. Install the latest firmware To get the best performance and reliability from your RAID systems, install the latest firmware.Connect RAID systems to an Ethernet network For best performance, don’t connect RAID controller Ethernet management ports to the SAN’s metadata network. Connect the ports to the separate Ethernet network that you use for other types of network traffic, such as directory services, Internet access, and remote Xsan management. Choose RAID levels for LUNs Use RAID 1 for metadata LUNs and RAID 5 for data LUNs. Use RAID 1 for metadata LUNs RAID 1 (mirroring) can give slightly better performance than the default RAID 5 scheme for the small, two-drive metadata LUNs that Xsan uses to store volume information. A single drive is almost always adequate for storing the primary volume metadata. (10 GB of metadata space is enough for approximately 10 million files.) The second, mirror drive protects you from metadata loss. Use RAID 5 for data LUNs Most RAID systems are optimized for excellent performance and data redundancy using a RAID 5 scheme. (RAID 5 stripes data across available drives and distributes parity data across the drives.) Some RAID systems ship preconfigured as RAID 5 LUNs. RAID 0 (striping with no parity) might give slightly better write performance, but it provides no data recovery protection, so RAID 5 is always a better choice for LUNs used to store user data. Adjust RAID system performance settings RAID system performance settings, which affect parameters such as drive caching, RAID controller caching, and read prefetching, can have a significant effect on Xsan volume performance. Follow these guidelines. Enable drive caching In addition to the caching performed by the RAID controller, each drive in an array can perform caching at the drive level to improve performance. WARNING: If you enable drive caching for a RAID set, make sure the system is connected to an uninterruptible power supply (UPS). Otherwise, you could lose cached data if the power fails. Enable RAID controller write caching Without RAID controller write caching, a request to write data to the associated LUN isn’t considered finished until the data is written to the physical disks that make up the array. Only then can the next write request be processed. (This is sometimes called write-through caching.) 54 Chapter 3 Plan a SANChapter 3 Plan a SAN 55 When RAID controller write caching is enabled, a request to write data is considered finished when the data is in the cache. This is sometimes called write-back caching. Write requests are processed more quickly because the file system only needs to write to the fast cache memory and doesn’t need to wait for the slower disk drives. Be sure to enable write caching on RAID controllers that support metadata storage pools. Although some large write requests might benefit from caching, often they don’t. By placing a volume’s metadata storage pool on a RAID controller separate from the data storage pools, you can enable caching on the RAID controller used for metadata and disable caching on the RAID controller used for data. When the file system is relying on caching in this way, you must guarantee that data in the cache isn’t lost before it’s written to disk. Data written to disk is safe if the power fails, but data in a cache is not. To be sure that a power failure can’t cause the loss of cached data, protect your RAID systems with RAID controller backup batteries or a UPS. WARNING: If you enable controller write caching on a RAID system, make sure the system includes controller backup batteries and, preferably, is connected to a UPS. Enable read prefetching Read prefetching is a technique that improves file system read performance when data is being read sequentially, as in the case of audio or video streaming, for example. When read prefetching is enabled, the RAID controller assumes that a read request for a block of data will be followed by requests for adjacent data blocks. To prepare for these requests, the RAID controller reads the requested data and the following data, and stores it in cache memory. Then, if the data is requested, it’s retrieved from the fast cache instead of from the slower disk drives.56 Follow step by step instructions for setting up a shared volume on an Xsan SAN. This chapter explains how to connect SAN networks, prepare RAID arrays (LUNs), use the Xsan Admin app, set up a SAN, and create a shared volume. This chapter also tells you how to administer Xsan remotely, rename a SAN, remove a SAN, set up additional SANs, and manage multiple SANs. Connect computers and storage devices Before you open Xsan Admin to configure your SAN, you must connect client computers, controller computers, and storage devices to the SAN’s Fibre Channel and Ethernet networks. In addition, make sure your networks meet the requirements summarized in “Fibre Channel fabric” on page 41 and “Ethernet TCP/IP network” on page 42. Prepare LUNs New RAID systems often come configured as one or more RAID arrays. So, out of the box, your RAID system might provide LUNs that you can use for most SAN applications. For details, see the documentation for your RAID system. Unless you have well-defined, special needs, no other LUN preparation is needed. To set up other combinations of RAID arrays or slices, use the management software that comes with your RAID systems to create the arrays before you add the resulting LUNs to your SAN’s storage pools. For information about choosing a RAID scheme, see “Choose RAID schemes for LUNs” on page 47. Note: Don’t use Disk Utility to format arrays or slices for use with Xsan. LUNs are labeled and initialized when you add them to a storage pool using Xsan Admin. After they are labeled, the LUNs can’t be modified using Disk Utility. 4 Set up a SANChapter 4 Set up a SAN 57 Be sure to create arrays of the same size if you plan to add them to the same affinity tag (or the same storage pool of a custom volume). For more information, see “Assign LUNs to affinity tags” on page 48. Use the server setup assistant to configure controllers You use the server setup assistant to configure servers as Xsan metadata controllers. The server setup assistant runs when you start up a new server or a server on which you have performed a clean installation of Mac OS X Lion Server. When using the server setup assistant to set up your primary metadata controller, you can choose how to manage Xsan users and groups. Manage users and groups with Xsan Admin When using the server setup assistant to set up your primary metadata controller, you can choose to manage SAN users and groups with Xsan Admin. This option is recommended if you don’t have a directory server and you expect to have up to 20 SAN users. These users will have local home folders on their computers (not network home folders on the server). Important: You can choose to manage users and groups with Xsan Admin only when you use the server setup assistant to set up your primary metadata controller. You can’t configure this option after setting up the primary controller with the server setup assistant. If you choose this option, the server setup assistant makes the primary metadata controller an Open Directory master server. Then Xsan Admin configures standby metadata controllers as Open Directory replica servers. For the Open Directory master and replicas, the directory administrator’s user name is Directory Administrator, the short name is diradmin, and the password is initially the same as the password of the administrator account that you create with the server setup assistant. Xsan Admin also configures Xsan client computers with Xsan 2 to connect to your Xsan primary metadata controller for Open Directory user and group accounts. Use an existing Open Directory server If you have an Open Directory server, you can have the server setup assistant configure your primary metadata controller to get users and groups from it. Then when you set up your SAN, the Xsan setup assistant configures standby metadata controllers and client computers to connect to the Open Directory server for users and groups.Use another directory server When using the server setup assistant to set up your primary metadata controller, you can also choose to connect to a directory server, including Active Directory or Open Directory, after you finish setup. In this case, you use the Users & Groups pane of System Preferences (the Accounts pane in Mac OS X or Mac OS X Server v10.6) on each metadata controller and client computer to configure a connection to your directory server. Use Xsan Admin You use the Xsan Admin app to set up and manage your SAN. You can use Xsan Admin to manage an Xsan 2.3 SAN from any computer that has Mac OS X Lion Server and has access to the same public intranet as the SAN. Xsan Admin is installed with Mac OS X Lion Server, and is located in the /Applications/Utilities/ folder. Connect through a firewall If there’s a firewall between the SAN and the computer you’re running Xsan Admin on, be sure port 311 in the firewall is open so Xsan Admin can communicate with the SAN computers. Xsan Admin preferences Open Xsan Admin and choose Xsan Admin > Preferences to adjust these settings:  SAN status refresh interval  The amount of log information displayed  The maximum number of users to list when searching Get help Xsan Admin includes onscreen help. Use the Help menu or click the Help button in any Xsan Admin dialog or pane. SAN and volume setup summary To set up a shared volume on a SAN, you’ll perform the following tasks.  Step 1: Set up the Fibre Channel network (page 59)  Step 2: Set up the Ethernet networks (page 59)  Step 3: Configure SAN computers to use a time server (page 60)  Step 4: Set up SAN users and groups (page 61)  Step 5: Set up RAID systems (page 62)  Step 6: Create a metadata array (page 62)  Step 7: Install Xsan software on clients and controllers (page 63)  Step 8: Configure the SAN (page 64) 58 Chapter 4 Set up a SANChapter 4 Set up a SAN 59  Step 9: Create a volume (page 65)  Step 10: (Optional) Set up SAN status notifications (page 68)  Step 11: (Optional) Assign folders to affinity tags (page 68)  Step 12: (Optional) Set user and group quotas (page 68) Set up an Xsan volume on a SAN Step 1: Set up the Fibre Channel network Set up the SAN Fibre Channel network: m Connect controller computers, client computers, and RAID storage systems to a Fibre Channel switch to create a Fibre Channel fabric for the SAN. Be sure to configure the switch and make the connections so you create a Fibre Channel fabric. For more information, see the guidelines and requirements in “Fibre Channel fabric” on page 41. Step 2: Set up the Ethernet networks Set up the SAN Ethernet networks: 1 Connect controller computers, client computers, RAID systems, and Fibre Channel switches to the public intranet and Internet. 2 Connect controller computers and client computers to the private metadata network. 3 Configure the network settings on the client and controller computers. For each computer’s public Ethernet port, you can configure the TCP/IP settings: Manually: You enter the static IP address, subnet mask, router address, and DNS server address for each computer. Using DHCP with manual address: You enter the computer’s static IP address, and your DHCP server provides the other TCP/IP connection settings. Using DHCP: Your DHCP server provides a static IP address and the other TCP/IP settings for client computers. (This configuration method isn’t available when setting up metadata controllers.) The DHCP server must be configured to always assign the same static IP address to each SAN computer.For the private metadata network, you can have the Xsan setup assistant configure the network settings if you’re setting up new computers or computers on which you’ve just performed a clean installation of Mac OS X Lion Server. To make sure the Xsan setup assistant offers this option, don’t configure the Ethernet port connected to the private metadata network:  On client computers, leave this Ethernet port unconfigured in Network preferences.  On controllers and clients with Mac OS X Lion Server, disable this Ethernet port while using the server setup assistant. The Xsan setup assistant offers to configure the private metadata network if it finds exactly one available unconfigured Ethernet port on each computer, or if each computer has an Ethernet port with a private IP address on the same IP subnet and a subnet mask of 255.255.255.0. For information about private IP addresses and the network settings you must make if the Xsan setup assistant doesn’t configure the metadata network settings on SAN computers, see “Ethernet TCP/IP network” on page 42. 4 Make sure all client and controller computers have different computer names, so you can distinguish them in Xsan Admin. Step 3: Configure SAN computers to use a time server To ensure consistent time metadata across all computers in the SAN, choose the same network time server for all metadata controller and client computers in the SAN. Choose a time server: m On each SAN computer, open Date & Time preferences and choose the same network time server for all metadata controller and client computers. If you’re setting up a new server or a computer that you’ve performed a clean installation of Mac OS X Lion Server on, you can choose a network time server in the Time Zone pane of the server setup assistant. 60 Chapter 4 Set up a SANChapter 4 Set up a SAN 61 Step 4: Set up SAN users and groups Here are several ways you can set up users and groups for your SAN: m If you’re setting up a new primary metadata controller or one you’ve just performed a clean installation of Mac OS X Lion Server on, select an option in the “Users and Groups” pane of the server setup assistant. Manage users and groups with Xsan Admin: Select this option to have the server setup assistant create a centralized directory of users and groups on the primary metadata controller. You can select this option only while setting up Mac OS X Lion Server on the primary metadata controller. You can’t configure this option after using the server setup assistant on the primary controller. After setup, you use Xsan Admin to create and delete users and groups and to change group membership. For information about Open Directory servers, see “Directory services” on page 43. Use existing users and groups from an Open Directory server: Select this option to have the server setup assistant configure the primary metadata controller to connect to the Open Directory server whose DNS name or IP address you specify. If you select this option, Xsan Admin configures all other SAN computers with Xsan 2 to use the Open Directory server. You can set up an Open Directory server, also called a network account server, and manage users and groups by using the Server app on a server with Mac OS X Lion Server. Connect to a directory server later: Select this option if you have another type of directory server, such as Active Directory.After setting up the primary metadata controller, use the Users & Groups pane of System Preferences (the Accounts pane on client computers with Mac OS X or Mac OS X Server v10.6) to connect the computer to your directory server. m If you don’t use a directory server, you must create the same set of users and groups in System Preferences on each SAN computer. Important: If you create users and groups on each SAN computer, make sure each user and group has a numeric user ID (UID) or group ID (GID) that is unique throughout the SAN, and make sure each SAN user and group has the same UID or GID on all SAN computers. One way to do this is to create an identical list of users and groups in the same order on each computer, following a clean installation of the operating system. Step 5: Set up RAID systems Set up RAID Systems: 1 Follow the instructions that come with your RAID systems to turn them on and configure their network, management, and security settings. 2 If your RAID systems come with RAID sets already configured, they’re detected during SAN setup and you can skip to “Step 6: Create a metadata array”on page 62; otherwise, use the management software that comes with the RAID system to create arrays based on the RAID schemes of your choice, leaving three drives on one system unassigned so you can create a small, separate metadata LUN as described in the next step. For help choosing other RAID schemes, see “Choose RAID schemes for LUNs” on page 47. Setup scripts for common configurations on Promise RAID systems are available at www.apple.com/support/xsan/. Step 6: Create a metadata array Ten GB of disk space is enough to store the metadata for a volume containing 10 million files, so a two-drive RAID 1 (mirrored) array is generally large enough to store the metadata for your SAN volume. If you dedicate a spare drive to this array to guarantee availability, three drives are adequate for your SAN metadata. If your RAID arrays consist of four or more drives, use these steps to convert an existing array into a small metadata array so you can reuse the extra drives. If you’ve set up a Promise RAID system using a script from www.apple.com/support/xsan/, you should already have a two-drive RAID 1 array for metadata, and you can skip to “Step 7: Enable Xsan on clients and controllers” on page 63. Create the metadata array: 1 If you don’t have three spare drives or if all drives in your RAID systems belong to RAID arrays, use the management app for your RAID system to delete an existing array. 2 Use two of the drives to create a two-drive RAID 1 (mirrored) array. 3 Assign a third drive as a dedicated spare for the array. 62 Chapter 4 Set up a SANChapter 4 Set up a SAN 63 You can use leftover drives from the original array to create a separate array, or save them for use as spares. Step 7: Enable Xsan on clients and controllers Enable Xsan on a computer with Mac OS X Lion or Lion Server: m On each computer that has Mac OS X Lion or Lion Server and is connected to the SAN, open System Preferences, click Xsan, and then click Enable Xsan. Enable Xsan on a computer that has no keyboard or display: 1 Log in to a computer that does have a keyboard and display. 2 In the Finder, choose Go > Connect to Server and enter vnc://address in the Server Address field, replacing address with the IP address or DNS name of the target computer. 3 Click Connect and enter the name and password of an administrator account on the target computer. 4 In the screen sharing window, open System Preferences, click Xsan, and then click Enable Xsan. You can also use the Apple Remote Desktop app (which you can purchase from the Mac App Store) to enable Xsan on remote computers. For information about Apple Remote Desktop, go to www.apple.com/remotedesktop/. Enable Xsan on a computer with Mac OS X or Mac OS X Server v10.6: 1 Insert the Xsan Install Disc, double-click the Install Xsan icon, and then follow the onscreen instructions until you reach the Custom Install pane. 2 In the Custom Install pane, deselect Xsan Admin, click Continue, and follow the remaining onscreen instructions to install only the Xsan file system. From the command line For information about using command-line tools in Terminal to install Xsan on a computer with Mac OS X or Mac OS X Server v10.6, see “Install Xsan from the command line” on page 143.Step 8: Configure the SAN You use Xsan Admin to configure the SAN. Configure the SAN: 1 Open Xsan Admin. You can open Xsan Admin after you finish installing the Xsan software on your primary metadata controller computer. You can also open Xsan Admin on any computer with Mac OS X Lion Server and an intranet or Internet connection to your SAN computers. (You can use Xsan Admin on a computer that isn’t connected to the SAN’s private metadata network or its Fibre Channel network.) 2 In the Introduction pane, click Continue. 3 In the Initial SAN Setup pane, select “Configure new SAN.” For information about connecting to an existing SAN, see “Manage multiple SANs” on page 69. 4 In the SAN Settings pane, enter a name for the SAN and then enter the SAN administrator’s name and email address. 5 In the Add Computers pane, make sure all the computers that you want to include in the SAN are selected. If a computer you want to include isn’t listed, make sure Xsan is enabled in that computer’s Xsan preferences (or you’ve installed Xsan, if the computer has Mac OS X or Mac OS X Server v10.6). Check that the computer is connected to both Ethernet networks—the public intranet and the private metadata network—and check the network settings in the computer’s Network preferences. You can also click Add Remote Computer to add computers manually. 64 Chapter 4 Set up a SANChapter 4 Set up a SAN 65 6 In the Authenticate SAN Computers pane, choose how you’ll provide authentication information for the SAN computers: Use same authentication information for all SAN computers: Select this option to have Xsan Admin authenticate to all computers using the administrator name and password you enter in this pane. Authenticate to SAN computers one by one: Select this option to authenticate to each computer individually. 7 If the Serial Numbers pane appears, enter your Xsan serial numbers for client computer with Mac OS X or Mac OS X Server v10.6. You can click Add Serial Number and enter a number, or drag a text file containing serial numbers to the list. 8 In the Choose Metadata Controllers pane, select your primary and standby controllers and deselect client computers that appear in the list. 9 If the Private Metadata Network pane appears, you can choose to have Xsan Admin manage the private metadata network addresses for all SAN computers. 10 If the SAN Network pane appears, choose your private metadata network from the Metadata Network pop-up menu. The SAN Network pane doesn’t appear if, in the previous step, you chose to have Xsan Admin manage the private metadata network addresses. 11 Review the Summary pane, and if all settings are correct, click Continue. To change a setting, click Go Back until you reach the pane where you can correct the setting. Then click Continue until you return to the Summary pane. Step 9: Create a volume When the Xsan setup assistant finishes basic SAN configuration, it asks if you want to create a volume.Create a volume: 1 In the “Create Volume” pane, select “Create a volume now” and click Continue. If you want to create volumes later, follow the instructions in “Add a volume to a SAN” on page 73. 2 In the “Volume Name and Type” pane, enter a name for the volume and choose a volume type that matches the type of work the volume will support. For the volume name, use only uppercase letters (A–Z), lowercase letters (a–z), numbers (0–9), and underscores ( _ ). Don’t include spaces or hyphens. The maximum length is 70 characters. The volume type you choose determines how the setup assistant configures affinity tags and storage pools on the volume. For information, see “How Xsan storage is organized” on page 34. 3 Optionally, click Advanced Settings and adjust the following volume settings: Block Allocation Size: If you’re not sure what value to use, use the preset size or see “Set the block allocation size” on page 80. Allocation Strategy: Choose how storage for files is allocated among the storage pools that belong to the volume. If you choose Round Robin, each request for space is assigned to the next available storage pool in turn. If you choose Fill, space is allocated on the first storage pool until it’s full, then on the second storage pool, and so on. If you choose Balance, space is allocated on the storage pool with the most free space. For more information, see “Choose an allocation strategy” on page 51. Spotlight: Enable this if you want Macintosh clients to search the contents of the volume using Spotlight. Native Extended Attributes: Select this option if all computers on your Xsan 2.3 SAN are Macs (which must have Xsan 2.2.1 or 2.3 to be on the SAN), and you want to ensure the best possible performance by storing related information for each file inside the file itself instead of in separate hidden files. You can’t deselect this option for a volume that was created with the option selected. Access Control Lists: Leave this selected if you want to use access control lists (ACLs) to control access to files and folders on the volume. Case Insensitivity: Select this if all the computers on your SAN have Mac OS X Lion, and you want this volume to ignore capitalization in filenames. For example, myfile, MyFile, and MYFILE are all the same filename if this option is turned on. This option is on by default if the SAN consists only of Macs with Lion. Windows ID Mapping: If you have Windows clients on your SAN, choose how they map user and group information to the Xsan-compatible user IDs (UIDs) and group IDs (GIDs), which they need so they can access Xsan volumes. For more information, see “Map Windows user and group IDs” on page 100. 66 Chapter 4 Set up a SANChapter 4 Set up a SAN 67 4 In the Configure Volume Affinities pane (or the Configure Volume Storage pane, if you’re configuring a custom volume type), drag LUNs from the left column to the corresponding affinity tag (or custom storage pool) in the right column. a Drag the special metadata LUN you created (in Step 6, “Create a Metadata Array”) to the MetadataAndJournal affinity tag (or custom storage pool). b Drag your other LUNs to the other affinity tags (or storage pools). To avoid wasting storage, all LUNs assigned to an affinity tag (or storage pool) should be the same size. c When you finish, click Continue. For information about the optimal number of LUNs to assign to an affinity tag, see “Assign LUNs to affinity tags” on page 48. 5 Optionally, you can select an affinity tag and click Settings to change the affinity tag name or other settings listed below. If you’re creating a custom volume, you can select it and click Storage Pool Settings to change the storage pool name or other settings listed below. Affinity Tag (or Storage Pool Name): Enter the name for the affinity tag (or custom storage pool). If the OK button is disabled when you finish entering the name, the name is reserved; try another. For more information about reserved names, see “If you can’t add a storage pool” on page 124. Use for: Choose the types of data that can be stored on storage pools that have this affinity tag (or that can be stored on the custom storage pool), following these rules: The first affinity in a volume can allow metadata only, journaling and metadata, or any data (which includes metadata, journaling, and user data). Thus the first affinity must always allow metadata. Other affinities can allow any data, only journaling and metadata, only journaling, only metadata, or only user data. Only one affinity can allow journaling. You can’t change the type of data an affinity stores without recreating the volume. If you allow user data only, you can specify whether to allow only data that has the matching affinity. If the data must have the matching affinity, the tag is called “exclusive,” and data without the affinity isn’t allowed. You can change this setting as needed. However, a volume must contain at least one affinity tag that isn’t exclusive. In other words, the volume must contain at least one affinity tag that accepts user data without an affinity. Stripe Breadth: Specify how much data is written to or read from each LUN in storage pools that have this affinity tag (or each LUN in the custom storage pool) before moving to the next LUN. This value can affect performance. If you’re not sure what value to use, accept the preset value.6 If the Volume Failover Priority pane appears, arrange the list so as few SAN volumes as possible have the same metadata controller first on their failover priority lists, and then click Continue. 7 In the Setup Complete pane, click Continue. Xsan Admin displays a summary of your SAN configuration and the new volume is mounted and ready to use in the Finder on all clients and metadata controllers. For information about creating additional volumes, see “Add a volume to a SAN” on page 73. Step 10: (Optional) Set up SAN status notifications Xsan is initially set to notify the administrator by email when the status of the SAN changes. You can have notifications sent to additional email addresses or textmessaging addresses using an SMTP server, and you can choose conditions that trigger notification to each address. If you don’t want to customize notifications now, you can do it later. For instructions, see “Set up status notifications” on page 119. Step 11: (Optional) Assign folders to affinity tags If you want to force files to be stored in specific storage pools, assign the affinity tag of the pools to a folder. Then, files that users put in the folder are stored only on storage pools that have that affinity tag. For instructions, see “Set up a folder affinity”on page 77. Step 12: (Optional) Set user and group quotas You can set up quotas to control how much space on each SAN volume is used by each user or group. For instructions, see “Set SAN user and group quotas” on page 100. Use an Xsan administrator computer The Xsan Admin app is installed with Mac OS X Lion Server, and you can use Xsan Admin on any computer that has Lion Server to administer an Xsan 2.3 SAN remotely. The administrator computer must be able to connect to all SAN computers via your public intranet or the Internet. The administrator computer doesn’t need to be connected to the SAN’s private metadata network or the SAN’s Fibre Channel network. For information about using Xsan Admin to manage a SAN remotely, see “Manage multiple SANs” on page 69. 68 Chapter 4 Set up a SANChapter 4 Set up a SAN 69 Rename a SAN The SAN name appears in the Overview pane of Xsan Admin. The SAN name is initially set when the SAN is set up. You can change this name using Xsan Admin. Change the name of a SAN: 1 Open Xsan Admin and click Overview. 2 Choose Edit SAN Properties from the Action pop-up menu (gear). 3 Type a name in the SAN Name field and click OK. Set up another SAN You can use Xsan Admin to set up more than one SAN. Add a new SAN: 1 Install the hardware, connect the Ethernet and Fibre Channel networks, set up the client computers, set up standby metadata controllers if you have them, set up the RAID systems, create a metadata array, and set up the primary metadata controller as instructed earlier in this chapter. If you’re setting up a SAN for the first time, see the planning guidelines in Chapter 3,“Plan a SAN,” on page 40 and the instructions at the beginning of this chapter. 2 Open Xsan Admin on the computer that you want to use to set up and manage the new SAN. 3 Choose File > New and follow the instructions in “Step 8: Configure the SAN”on page 64. Manage multiple SANs You can use Xsan Admin to manage more than one Xsan 2 SAN. The computer with Xsan Admin doesn’t need to be connected to the SAN’s private metadata network or its Fibre Channel network, but it must be able to connect to the SAN computers via your public intranet or the Internet. Manage another SAN: 1 Open Xsan Admin and choose File > New. 2 Click Continue in the Introduction pane. 3 Select “Connect to existing SAN,” click Continue, and follow the onscreen instructions.Destroy a SAN Follow these steps to take a SAN out of service and remove its metadata controllers, clients, and volumes. WARNING: Removing a SAN destroys its volumes. Data stored on the volumes is no longer available. Destroying a SAN also removes all Xsan configuration files from all SAN computers. If Xsan Admin is managing users and groups, or the metadata controllers were configured to get user and group accounts from an existing directory server, destroying a SAN destroys any Open Directory replicas on standby metadata controllers and disconnects SAN clients from the directory server. Destroy a SAN: 1 If you want files located on the SAN volumes to be available after you remove the SAN, back up the files. 2 Open Xsan Admin and click Overview. 3 Choose Destroy SAN from the Action pop-up menu (gear). 70 Chapter 4 Set up a SAN71 Use Xsan Admin and related command-line tools to expand, add, modify, check, and repair SAN volumes. This chapter shows how you can expand an existing Xsan volume to provide more free space. It also contains information about volume and storage pool settings, and shows how to check and resolve volume integrity and fragmentation problems. Add storage To increase the storage on your SAN, you can:  Add volumes  Add storage pools to existing volumes  Add LUNs to affinity tags If you add a volume based on a custom volume type, you work directly with storage pools. However, if you add a volume using a built-in Xsan volume type (for example, General File Server or Podcast Producer Cluster), you don’t deal directly with storage pools. Instead, you work with affinity tags that represent storage pools. Xsan Admin organizes available LUNs into storage pools for you, based on the performance requirements of the chosen volume type. Adding a storage pool to a volume increases available storage and also requires Xsan Admin to stop the volume and unmount it. Adding storage pools is a quick way to expand a volume and doesn’t require defragmenting the volume to recover performance. Important: If you add LUNs to an affinity tag, add LUNs only in the recommended multiples. Keep surplus LUNs as extras until you have enough to add them in the recommended multiples for the volume type. Adding LUNs other than in the recommended multiples can result in serious fragmentation. 5 Manage SAN storageIf you're using a custom volume type, you can increase storage by adding volumes or storage pools, but don't add LUNs to an existing storage pool. Adding LUNs to an existing storage pool in a custom volume can result in serious fragmentation. Prepare LUNs Each LUN in an Xsan volume is a RAID array. How you set up your arrays depends on the storage device you use. To create a set of LUNs for your SAN, use the administration software for your RAID system to create, for example, LUNs based on different RAID schemes or LUNs based on array stripes. Setup scripts for creating common LUN configurations on Promise RAID systems are available at www.apple.com/support/. Find the drive modules that belong to a LUN To see which physical drive modules belong to a LUN, you can use Xsan Admin to turn on the drive activity lights on the RAID system that hosts the LUN. Click to turn on drive lights for selected LUN. Find a LUN’s drives: m In Xsan Admin, select LUNs in the SAN Assets list, select a LUN in the list of LUNs, and then click the “Identify LUN Using RAID Lights” button in the lower-right corner of the window. Then, look at your RAID hardware to find the drives with activity lights that are on. 72 Chapter 5 Manage SAN storageChapter 5 Manage SAN storage 73 Add a volume to a SAN A single Xsan SAN can provide access to multiple volumes. Click to add a new volume. Select to view current volumes. Add a volume: 1 In Xsan Admin, select Volumes in the SAN Assets list and click the Add Volume button (+). 2 In the Volume Name and Type pane of the assistant, enter a name for the volume and choose a volume type that matches the kind of work the volume will support. Xsan Admin sets the underlying volume settings accordingly. If you expect the volume to be used by client computers with Quantum’s StorNext File System (Windows, AIX, IRIX, Linux, and Solaris computers), click Advanced Settings, and then turn off the Native Extended Attributes option. Leave this option turned on if all computers on your SAN are Macs. WARNING: To avoid data loss, clients with Quantum’s StorNext File System must not access volumes that use extended attributes.3 In the Configure Volume Affinities pane (Configure Volume Storage, if you chose the custom volume type), drag LUNs to affinity tags (or storage pools). 4 In the Volume Failover Priority pane, drag the controller that you want to host the volume whenever possible to the top of the list, and arrange the other controllers in descending order of preference. For information about advanced settings, see “Change advanced volume settings” on page 79 or “Change storage pool settings” on page 83. When you finish, the volume mounts on all SAN clients. Add a storage pool to a volume You can add free space to a SAN volume by adding a storage pool to the volume. If you’re expanding a volume that’s based on a built-in volume type, you can create a new affinity tag and add LUNs to it. Xsan Admin creates and organizes storage pools within that tag for you. If you add LUNs to an existing affinity tag, Xsan Admin creates storage pools for you. If an existing storage pool has fewer LUNs than recommended for the affinity tag, Xsan Admin fills that storage pool before creating a new one. If you’re expanding a custom volume, you create storage pools directly and add LUNs directly to them. Note: A volume can’t contain more than 512 storage pools. Add a storage pool: 1 If necessary, connect the RAID systems that host the storage pool’s LUNs to the SAN Fibre Channel network and turn on the device. 2 In Xsan Admin, select Volumes in the SAN Assets list. 3 Select the volume in the list and choose Expand Volume from the Action pop-up menu (gear). 4 In the Label LUNs pane of the assistant, choose whether to label unlabeled LUNs individually or sequentially based on a label prefix. If you label LUNs individually, click Edit LUN Label on the next pane and enter a new label. If you use a label prefix, Xsan Admin adds a number to the end of the prefix to create a label for each LUN. For example, if you use the prefix “LUN,” your LUNs are labeled “LUN1,” “LUN2,” and so forth. Already-labeled LUNs aren’t affected. 74 Chapter 5 Manage SAN storageChapter 5 Manage SAN storage 75 5 In the Configure Volume Storage pane, click New Affinity Tag (or New Pool) to add an affinity tag (or storage pool), and then drag LUNs to the new tag (or pool). Important: Add LUNs to a new affinity tag in the recommended multiples. Otherwise, serious volume fragmentation can result. 6 Click Continue to unmount and stop the volume, add the new storage, and remount the expanded volume. From the command line You can also add a storage pool by editing the associated volume configuration file in Terminal. For information, see the cvfs_config man page or “Xsan configuration files” on page 158. You can see the cvfs_config man page by entering this command in Terminal: $ man -M /System/Library/Filesystems/acfs.fs/Contents/man/ 4 cvfs_config Add LUNs to an affinity tag You can increase the size of a SAN volume that’s based on a built-in volume type by adding LUNs (RAID arrays or array slices) to affinity tags. Xsan Admin assigns those LUNs to underlying storage pools for you, creating storage pools as needed, based on the optimal number of LUNs per pool for the volume type (“Assign LUNs to affinity tags” on page 48). Note: A storage pool can’t contain more than 32 LUNs, the total number of LUNs in a volume can’t be greater than 512, and you can’t add LUNs to a storage pool that contains only journal data or metadata.Choose compatible LUNs LUNs you add to an existing storage pool must be at least as large as the LUNs in the pool, but if a new LUN is larger than the other LUNs in the pool, its extra capacity can’t be used. Always try to add LUNs that are identical or similar in performance and capacity to the LUNs already in the storage pool. Mixing LUNs of different sizes or speeds in the same storage pool wastes capacity and can degrade performance. Action menu Add a LUN to an affinity tag: 1 If you haven’t done so, connect the RAID system that hosts the LUN to the SAN Fibre Channel network and turn on the device. 2 In Xsan Admin, select Volumes in the SAN Assets list. 3 Select the volume in the list and choose Expand Volume from the Action pop-up menu (gear). 4 In the Label LUNs pane of the assistant, choose whether you want to label unlabeled LUNs individually, or sequentially based on a label prefix. If you label LUNs individually, click Edit LUN Label on the next pane and enter a new label. If you use a label prefix, Xsan Admin adds a number to the end of the prefix to create a label for each LUN. For example, if you use the prefix “LUN,” your LUNs are labeled “LUN1,” “LUN2,” and so forth. Already-labeled LUNs aren’t affected. If your LUNs are already labeled, they aren’t changed. 76 Chapter 5 Manage SAN storageChapter 5 Manage SAN storage 77 5 In the Configure Volume Storage pane, drag the new LUNs to affinity tags. Important: Add LUNs to affinity tags in the recommended multiples. Don’t add LUNs to existing storage pools in a custom volume. Otherwise, serious volume fragmentation can result. 6 Click Continue to unmount and stop the volume, add the storage, and remount the expanded volume. From the command line You can also add LUNs to an affinity tag by editing the associated volume configuration file and using the cvlabel command-line tool in Terminal. For information, see the cvfs_config and cvlabel man pages or “Xsan configuration files” on page 158 and “Label, list, and unlabel LUNs (cvlabel)” on page 151. You can see the cvfs_config man page by entering this command in Terminal: $ man -M /System/Library/Filesystems/acfs.fs/Contents/man/ 4 cvfs_config Rearrange Fibre Channel connections If you need to rearrange Fibre Channel connections when adding LUNs to your SAN, unmount SAN volumes from clients before you disconnect Fibre Channel cables or turn off Fibre Channel switches. Otherwise, if you unplug or interrupt a Fibre Channel connection between a client and a mounted volume, you might cause problems with client apps, making the volume difficult to remount. Set up a folder affinity Every storage pool in a volume has an affinity tag. You can use the tag to be sure that files in a folder are stored on a specific storage pool. Files in folders without affinities are stored on the next available storage pool according to the volume’s allocation strategy (fill, round-robin, or balance). For more information, see “Affinities and affinity tags” on page 35 and “Folders with affinities” on page 36. Some storage pools might be larger, faster, or better protected than others. Using affinities, you can make sure that an app or task that needs speed or extra protection stores its files on a suitable storage pool.Using Xsan Admin, you can choose an affinity for an existing folder or create a folder with an affinity. Action pop-up menu Assign an affinity tag to a folder: 1 In Xsan Admin, select File Management in the SAN Assets list. 2 Select the folder in the columns that list the volume’s contents, choose Set Affinity from the Action pop-up menu (gear), and choose an affinity tag. If the folder doesn’t exist, choose New Folder from the Action pop-up menu (gear), enter a folder name, and then choose an affinity tag. From the command line You can also create a folder and assign it an affinity using the cvmkdir command-line tool in Terminal. For information, see the cvmkdir man page. Change a folder’s affinity You can use Xsan Admin to change a folder’s affinity so all new files placed in the folder are stored on a new storage pool. Change a folder affinity: 1 In Xsan Admin, select File Management in the SAN Assets list. 2 Select the folder, choose Set Affinity from the Action pop-up menu (gear), and then choose the new affinity tag. 3 Click OK. 78 Chapter 5 Manage SAN storageChapter 5 Manage SAN storage 79 Files in the folder aren’t moved to the new storage pool. To move the files that were in the folder to a storage pool with the new affinity tag, use the snfsdefrag commandline tool in Terminal. For information and an example, see the snfsdefrag man page. Remove an affinity You can undo a folder’s affinity for a storage pool by choosing None for the folder affinity. Remove the affinity from a folder: 1 In Xsan Admin, select File Management in the SAN Assets list. 2 Select the folder, choose Set Affinity from the Action pop-up menu (gear), and then choose None for the affinity. Change advanced volume settings If your SAN volume has special configuration requirements, you can change the standard volume settings when you create a volume. You can also change these settings for an existing volume, except for the block allocation size and disabling the extended attributes option. (Once enabled, extended attributes can’t be disabled.) Note: To change a volume’s block allocation size or disable extended attributes, you must destroy and recreate the volume.View or change volume settings: m Select Volume in the SAN Assets list, select the volume in the list, and choose Edit Volume Settings from the Action pop-up menu (gear). The following sections contain information about each setting. Set the block allocation size Xsan uses the volume block allocation size with the storage pool stripe breadth to decide how to write data to a volume. If you create a volume based on a built-in volume type (for example, General File Server or Podcast Producer Cluster), Xsan Admin sets optimal values for you. For most volumes, the preset block allocation size and storage pool stripe breadth result in good performance. However, in some cases you might be able to improve read or write performance by adjusting these settings to suit a specific app. For example, if your app reads and writes small blocks of data, you might improve performance by choosing a correspondingly small block allocation size. Set a volume’s block allocation size: m The block allocation size must be set when the volume is created, and can’t be changed for an existing volume. To set the block allocation size, click the Advanced Settings button on the Volume Name and Type pane when you first add the volume. Change the volume allocation strategy You can change the allocation strategy for a volume, to choose how storage for new files or additional storage for existing files is allocated on the storage pools that belong to the volume. Change the allocation strategy: 1 In Xsan Admin, select Volumes in the SAN Assets list. 2 Select the volume in the list and choose Edit Volume Settings from the Action pop-up menu (gear). 3 Choose an allocation strategy from the pop-up menu: Round Robin: Each request for space is assigned to the next available storage pool in the volume. Fill: All data is stored on the first storage pool until it’s full, then on the next storage pool, and so on. Balance: New data is written to the storage pool that has the most free space. 4 Click OK. Note: After you click OK, the volume restarts. 80 Chapter 5 Manage SAN storageChapter 5 Manage SAN storage 81 Enable or disable Spotlight on a volume You can use Xsan Admin to control whether a volume is indexed and searchable using Spotlight. Enable or disable Spotlight on a volume: 1 In Xsan Admin, select Volumes in the SAN Assets list. 2 Select the volume and choose Edit Volume Settings from the Action pop-up menu (gear). 3 Select or deselect the checkbox next to Spotlight and click OK. Note: After you click OK, the volume restarts. Enable extended attributes If extended attributes were disabled on a SAN volume when it was created, and all computers that use the volume are Macs, you can enable extended attributes for the files on the volume. When extended attributes are enabled, attributes associated with a file are stored inside the file itself, rather than in separate hidden files. Enabling extended attributes improves file system performance. Extended attributes are enabled when you create a volume with Xsan 2.3, unless you deliberately disable them. Important: You can’t disable extended attributes. Enabling them on a volume is a oneway process that can’t be undone. WARNING: To avoid data loss, clients with Quantum’s StorNext File System (Windows, AIX, IRIX, Linux, and Solaris computers) must not access volumes that use extended attributes. Macs clients of an Xsan 2.3 SAN must have Xsan 2.2 or later, which supports extended attributes. Enable extended attributes: 1 In Xsan Admin, select Volumes in the SAN Assets list. 2 Select the volume and choose Edit Volume Settings from the Action pop-up menu (gear). 3 Select the checkbox next to Extended Attributes and click OK. Note: After you click OK, the volume is unmounted from all SAN computers, and then remounted. The time needed to convert the volume to use extended attributes depends on the size of the volume and the number of files stored on it.Enable or disable access control lists You can use Xsan Admin to specify whether the Xsan file system uses access control lists (ACLs) on a volume. Xsan 2 clients and Windows StorNext clients recognize ACLs. UNIX clients ignore ACLs on Xsan volumes. If you have a mix of Windows clients and Xsan clients, they must all be bound to the same directory domain, whether provided by Open Directory configured as a primary domain controller (PDC) or by Windows Active Directory. Note: If you enable ACLs but your SAN includes clients that don’t support them, don’t use those clients to change file or folder ownership information, or inconsistencies might result. Enable or disable ACLs: 1 In Xsan Admin, select Volumes in the SAN Assets list. 2 Select the volume and choose Edit Volume Settings from the Action pop-up menu (gear). 3 Select or deselect the checkbox next to Access Control Lists and click OK. Note: After you click OK, the volume is unmounted from all SAN computers, and then remounted. Change filename case sensitivity If all the computers on your SAN have Mac OS X Lion or Lion Server, you can specify whether a volume ignores capitalization in filenames. For example, a volume can consider myfile, MyFile, and MYFILE to be the same or different filenames. This option is on by default if the SAN consists only of Macs with Lion. For best performance with volumes that you share using the SMB protocol, make them case insensitive. Change filename case sensitivity for a volume 1 In Xsan Admin, select Volumes in the SAN Assets list. 2 Select the volume and choose Edit Volume Settings from the Action pop-up menu (gear). 3 Select or deselect the checkbox next to Case Insensitivity and click OK. When you change case sensitivity, Xsan checks all existing filenames to make sure the change won’t result in filenames being considered the same. This check can take a while. If Case Insensitivity is selected, the volume considers filenames to be the same if they’re spelled alike but capitalized differently. If Case Insensitivity is not selected, the volume considers filenames to be different if they’re spelled alike but capitalized differently. Note: After you click OK, the volume is unmounted from all Xsan computers, and then remounted.. 82 Chapter 5 Manage SAN storageChapter 5 Manage SAN storage 83 Change the Windows ID mapping If you have Windows clients on your SAN, the Windows ID Mapping setting determines how they map user and group information to the Xsan-compatible user IDs and group IDs they need in order to access this volume. For more information, see “Map Windows user and group IDs” on page 100. Change advanced allocation and cache settings Volume settings that control the allocation of space for growing files and the caching of file-related data structures are set by Xsan Admin to suit the type of volume you set up. If necessary, you can use Xsan Admin to adjust these advanced allocation and caching settings for a volume. Important: Do not adjust these settings unless you understand their role in volume performance or you are directed to change them by Apple support personnel. Change advanced volume settings: m In Xsan Admin, select Volumes in the SAN Assets list, select the volume, choose Edit Volume Settings from the Action pop-up menu (gear), and then specify: File Expansion Min: The number of storage blocks added to the file for the first expansion request. File Expansion Increment: The number of storage blocks by which the expansion request is increased for each subsequent request. File Expansion Max: The maximum expansion request that’s allowed. Inode Cache Size: The maximum number of inode data structures that can be cached on the volume by the metadata controller. Buffer Cache Size: The amount of memory that the metadata controller can allocate for storing a volume’s metadata. Note: Changing advanced volume settings causes the volume to restart. Change storage pool settings The SAN Setup assistant chooses storage pool settings based on the type of volume you use them on. To specify storage pool settings yourself, choose an affinity tag or storage pool in the Configure Volume Affinities pane of the SAN Setup assistant when you create a volume, or when you add a storage pool to a volume, and click the Settings button below the list. The best way to set up a SAN is to plan its organization carefully before you set it up, including settings for the storage pools that make up its volumes. To change storage pool settings for an existing volume, you must destroy and recreate the volume.Change the exclusivity of an affinity tag The “Use for” affinity tag setting specifies the type of data—metadata, journaling, or user data—a storage pool with that affinity can store. You choose the type of data when you create a volume, and you can’t change the type of data an affinity stores without recreating the volume. If an affinity allows user data only, you can specify whether to allow only data that has the matching affinity. If the data must have the matching affinity, the tag is called “exclusive,” and data without the affinity isn’t allowed. You can change this setting as needed. Change the exclusivity of an affinity tag: 1 In Xsan Admin, select the storage pool in the Volumes pane and choose Edit Affinity Settings from the Action pop-up menu (gear). 2 Click the checkbox to select or deselect “Only data with affinity.” If the checkbox is deselected, this is the last affinity tag in the volume that isn’t exclusive. A volume must contain at least one affinity tag that isn’t exclusive. In other words, the volume must contain at least one affinity tag that accepts user data without an affinity. Set the storage pool stripe breadth Xsan uses both the storage pool stripe breadth and the volume block allocation size to decide how to write data to a volume. For most SANs, the default values for storage pool stripe breadth and volume block allocation size result in good performance. However, in some cases you might be able to improve read and write performance by adjusting these values to suit a specific application. The stripe breadth must be set when the volume is created; it can’t be changed for an existing volume. Set a storage pool’s stripe breadth: m When you create the volume, click the Settings button below the Affinity Tag list in the Configure Volume Affinities pane of the setup assistant. Maintain SAN volumes Here are several volume maintenance tasks you can perform:  Rename a volume  See whether files or free space have become fragmented, and fix fragmentation.  If users have trouble accessing files, check the integrity of the volume, its metadata, and its files, and make necessary repairs  Destroy a volume so you can use its LUNs in a different volume 84 Chapter 5 Manage SAN storageChapter 5 Manage SAN storage 85 Rename a volume You can use Xsan Admin to change the name of a volume. You can’t rename an Xsan volume using the Finder. Important: During renaming, the volume is unmounted and restarted, and therefore unavailable to clients. Rename a volume: m In Xsan Admin, select Volumes in the SAN Assets list, select the volume, and then choose Rename Volume from the Action pop-up menu (gear). Check volume fragmentation When you create a file, Xsan divides the file into pieces and distributes these pieces efficiently over the LUNs that make up one of the volume’s storage pools. Over time, as the file is modified, its pieces become fragmented in less efficient arrangements. You can use the snsfdefrag command-line tool to check the amount of file fragmentation, or use the cvfsck command-line tool to check the amount of free space fragmentation. Check volume fragmentation: 1 Open Terminal (in the /Applications/Utilities/ folder) on any SAN computer. If you aren’t working at a SAN computer, use SSH to log in to a SAN computer remotely: $ ssh user@computer Replace user with the name of an administrator user on the SAN computer and computer with the SAN computer’s name or IP address. If you have trouble making an SSH connection, check the Sharing pane of System Preferences on the SAN computer to make sure Remote Login service is turned on. 2 To check file fragmentation on a volume, run the snsfdefrag command-line tool with the -cr options: $ sudo snfsdefrag -cr volume 3 To check free space fragmentation on a volume, you must use Terminal on a metadata controller or use SSH to log in to a controller remotely, and run the cvfsck commandline tool with the -f option: $ sudo cvfsck -f volume For more information, see the cvfsck or snsfdefrag man page. Defragment a volume Defragmenting a file reassembles its pieces into the most efficient arrangement. You can use the snfsdefrag command-line tool to defragment a file, a folder, or an entire volume.Defragment a file, folder, or volume: 1 Open Terminal (in the /Applications/Utilities/ folder) on any SAN computer. If you aren’t working at a SAN computer, use SSH to log in to a SAN computer remotely: $ ssh user@computer Replace user with the name of an administrator user on the SAN computer and computer with the SAN computer’s name or IP address. If you have trouble making an SSH connection, check the Sharing pane of System Preferences on the SAN computer to make sure Remote Login service is turned on. 2 Run the snfsdefrag command-line tool. To defragment individual files: $ sudo snfsdefrag -v filename [filename ... ] To defragment a folder: $ sudo snfsdefrag -vr folder To defragment a volume, set folder to the volume name. For more information, see the snfsdefrag man page or “Defragment a file, folder, or volume (snfsdefrag)” on page 154. Check the integrity of a volume If SAN users have trouble accessing files, use the cvfsck command-line tool to check the integrity of a volume, its metadata, and its files. Check a volume: 1 Open Terminal (in the /Applications/Utilities/ folder). 2 If you aren’t working at the SAN controller computer, use SSH to log in to the controller remotely: $ ssh user@computer Replace user with the name of an administrator user on the controller computer and computer with the controller’s name or IP address. If you have trouble making an SSH connection, check the Sharing pane of System Preferences on the controller to make sure Remote Login service is turned on. 3 Run the cvfsck command-line tool (in /System/Library/Filesystems/acfs.fs/Contents/ bin/) to check the volume without making repairs: $ sudo cvfsck -vn volume You’ll see a warning that the journal is active; this is normal. For more information, see the cvfsck man page. 86 Chapter 5 Manage SAN storageChapter 5 Manage SAN storage 87 Repair a volume If the cvfsck tool reveals problems with a volume, you can use the cvfsck commandline tool to repair the volume. Repair a volume: 1 Stop the volume. Open Xsan Admin, select the volume, and click Stop Volume in the Action pop-up menu (gear). The volume will be unmounted on all SAN computers. 2 Open Terminal (in the /Applications/Utilities/ folder). If you aren’t working at the SAN controller computer, use SSH to log in to the controller remotely: $ ssh user@computer Replace user with the name of an administrator user on the controller computer and computer with the controller’s name or IP address. If you have trouble making an SSH connection, check the Sharing pane of System Preferences on the controller to make sure Remote Login service is turned on. 3 Run the cvfsck command-line tool (in /System/Library/Filesystems/acfs.fs/Contents/ bin/) to replay the events that are recorded in the file system journal: $ sudo cvfsck -j volume 4 Check the volume to see if repairs are required: $ sudo cvfsck -vn volume 5 If the report generated in the previous step lists problems, enter the following command to perform a full check and repair of the volume: $ sudo cvfsck -vw volume 6 Start the volume, and then remount it on SAN computers. In Xsan admin, select the volume, and click Start Volume in the Action pop-up menu. For additional instructions, see “Mount a volume on a client” on page 92. For more information, see the cvfsck man page.Check RAID devices If a RAID array that belongs to an Xsan volume becomes damaged and unrecoverable due to a failed disk drive or other hardware failure, the data on the volume can be lost. To avoid this possibility:  Regularly check the state of your RAID hardware, either by using the management app that came with the RAID system or by visiting the hardware to check the state of the status lights. You might be able to set up your RAID system management app to notify you when an array is degraded.  If an array becomes degraded, replace the failed drive immediately to avoid the possibility of an additional drive failure causing the loss of the entire array. To have this happen automatically, set up your arrays with hot spare drives. Destroy a volume You can destroy a volume so you can reuse its LUNs to create new volumes. WARNING: After destroying a volume, data stored on it is no longer available. Destroy a volume: m In Xsan Admin, select Volumes in the SAN Assets list, select the volume in the list, and choose Destroy Volume from the Action pop-up menu (gear). 88 Chapter 5 Manage SAN storage89 You can use Xsan Admin and related command-line tools to add, control, and remove client computers and their users. Xsan clients are computers that have Fibre Channel connections to a SAN. SAN users log in to client computers to access files stored on SAN volumes. This chapter shows you how to add clients, control client access to volumes, and manage user quotas. Add a client Before a computer can use a SAN volume, you must add the computer to the SAN as a client. These instructions show you how to add a client computer to a SAN. Add button Select to view computers already in SAN. 6 Manage clients and usersAdd a client computer to a SAN: 1 Connect the client to the SAN’s Fibre Channel and Ethernet networks. 2 On a client that has Mac OS X Lion or Mac OS X Lion Server, open System Preferences, click Xsan, and then click Enable Xsan. The client can now use Xsan volumes. 3 On a client with Mac OS X or Mac OS X Server v10.6 Snow Leopard, install the Xsan software, and then use Software Update to get the latest Xsan 2.2 update. 4 Open Xsan Admin, select Computers in the SAN Assets list, and then click the Add button (+). 5 In the Add Computers pane of the assistant, make sure there’s a check next to the new client in the list, and then click Continue. If the client isn’t in the list, click Add Remote Computer and add it. 6 In the Authenticate Clients pane, enter the administrator name and password for the client and click Continue. 7 If you’re adding a client with Mac OS X or Mac OS X Server v10.6, and serial numbers aren’t available, the Serial Numbers pane appears so you can add one. 8 In the Choose Metadata Controllers pane, make sure there’s no check next to the new client in the list, then click Continue. 9 In the Summary pane, click Continue. If Xsan Admin won’t add a client that has Mac OS X v10.6 Snow Leopard and Xsan 2.2.1, there may be existing volumes that are case sensitive. Xsan 2.2.1 doesn’t support casesensitive volumes. After you add a client computer to the SAN, volumes that are mounted on all other SAN computers are mounted automatically on the new client. Volumes that are mounted only on some SAN computers aren’t mounted automatically on the new client, but you can mount those volumes manually. For instructions, see “Mount a volume on a client” on page 92. 90 Chapter 6 Manage clients and usersChapter 6 Manage clients and users 91 Add an Xsan serial number If you want to add Xsan software serial numbers for client computers with Mac OS X or Mac OS X Server v10.6 Snow Leopard, you can enter the numbers in Xsan Admin. Add button Select to view current serial numbers. Add an Xsan serial number: 1 In Xsan Admin, select Serial Numbers in the SAN Assets list. If you don’t see Serial Numbers in the SAN Assets list, add a computer that has Mac OS X or Mac OS X Server v10.6 to the SAN. 2 Click the Add button (+). 3 Enter the serial number, registered owner, and organization information provided by Apple, and then click OK. If you have serial numbers in a text file, you can drag the file to the Serial Number list in Xsan Admin. Move a client to a different SAN You can move a client from one Xsan SAN to a different SAN on the same Ethernet subnet and Fibre Channel network. Move a client computer to a different SAN: 1 In Xsan Admin, select Computers in the SAN Assets list. 2 Select the computer in the list and choose “Remove computer from SAN” from the Action pop-up menu (gear)pop-up menu.3 In Xsan Admin, open the window for the SAN you want to move the computer to. 4 In the new SAN window, select Computers in the SAN Assets list and click the Add button (+). 5 Make sure there’s a check next to the computer in the list, and then click Continue. 6 In the Authenticate Clients pane, enter the administrator name and password for the client and click Continue. Mount a volume on a client When you create a volume, it is mounted on SAN computers. However, if you stop a volume or explicitly unmount a volume from a client, you must mount it again to restore access. Select to view computers that don’t have the volume mounted. Select the volume. Mount Read & Write button Mount an Xsan volume on a client: 1 In Xsan Admin, select Mounts in the SAN Assets list. 2 Select the client in the list. 3 Select the volume in the Volume pop-up menu. 4 To allow the client to modify files on the volume, click the Mount Read & Write button. 92 Chapter 6 Manage clients and usersChapter 6 Manage clients and users 93 A volume remains mounted on a client even if the user logs out or the client computer restarts. If you unmount a volume using Xsan Admin, or if the client computer has Mac OS X Lion and the user unmounts the volume using Xsan preferences, the volume remains unmounted after logout and restart. If a user unmounts the volume in the Finder, it remounts in a few moments. From the command line You can also mount a volume on a client using the xsanctl command-line tool in Terminal. For information, see the xsanctl man page or “Mount an Xsan volume” on page 157. Change mount options You can use Xsan Admin to adjust settings that can affect volume access performance. Change mount options: 1 In Xsan Admin, select Mounts in the SAN Assets list. 2 Select the volume in the Volume pop-up menu. 3 Select the client in the list. 4 Choose Edit Mount Options from the Action pop-up menu (gear) and change: Directory cache size: Controls the number of file system directory entries cached on the client for each SAN volume. Increase this value if the volume contains a large number of small files (for example, if the volume hosts a home directory server or mail server). Client worker threads: Controls the number of threads used to communicate with the volume. You might increase this if you’re mounting many volumes on a client. Delay access time updates until files are closed: Lets you increase performance by reducing the number of access time updates on a file that’s read frequently (for example, streaming video). If not enabled, file access time is updated every time the file is read. For more information, see the descriptions of these parameters in the mount_acfs man page. Manage users and groups Depending on how you first set up your SAN, you manage users and groups using Xsan Admin or another app.Manage users and groups with Xsan Admin When you first set up your SAN controllers, you can use Xsan Admin to manage SAN user and group accounts. An Open Directory master is created on your primary metadata controller, with replicas on your standby controllers. You can then use Xsan Admin to create or remove user and group accounts. Manage users and groups with another app If you choose not to manage accounts using Xsan Admin because you already have a network account server, also called a directory server, use the appropriate directory management tool to add or delete accounts. If a Mac with Mac OS X Lion Server is your network accounts server, you can use the Server app to manage user and group accounts. If your network accounts server has Mac OS X Server v10.6 Snow Leopard or earlier, you can use Workgroup Manager to manage user and group accounts. In either case, users can connect their Macs to the network accounts server in the Users & Groups pane of System Preferences (the Accounts pane in Mac OS X v10.6). Add SAN users Only users in the SAN’s directory can log in to a client computer and access Xsan volumes. You can use Xsan Admin to add users to the directory on your primary metadata controller. Select to view current SAN users. Add button 94 Chapter 6 Manage clients and usersChapter 6 Manage clients and users 95 Note: These instructions apply only if, during initial SAN setup, you chose to use Xsan Admin to manage users and groups. If you have a different directory configuration, use the management software for your directory to add user accounts. Add a user: 1 In Xsan Admin, select Users and Groups in the SAN Assets list. Users and Groups appear only if you chose to have Xsan manage users and groups during initial setup. 2 Click the Users button above the list of users and groups. 3 Click the Add button (+). 4 Enter a user name and password, and click OK. Delete SAN users Only users in the SAN’s directory can log in to a client computer and access Xsan volumes. You can use Xsan Admin to delete users from your SAN directory. Note: These instructions apply only if, during initial SAN setup, you chose to use Xsan Admin to manage users and groups. If you have a different directory configuration, use the management software for your directory to delete user accounts. Delete a user: 1 In Xsan Admin, select Users and Groups in the SAN Assets list. 2 Select the user in the list and choose Delete User or Group from the Action pop-up menu (gear). Create groups You can create groups of users to simplify user management. If you chose to have Xsan manage your users and groups, you already have a group named Workgroup that contains all users. Note: These instructions apply only if, during initial SAN setup, you chose to use Xsan Admin to manage users and groups. If you have a different directory configuration, use the management software for your directory to add groups. Add a group: 1 In Xsan Admin, select Users and Groups in the SAN Assets list. 2 Click the Groups filter button above the list of users and groups. 3 Click the Add button (+). 4 Enter a group name and password. 5 Select the checkbox next to the users who belong to the group. 6 Click OK.Delete groups You can use Xsan Admin to delete a group. Note: These instructions apply only if, during initial SAN setup, you chose to use Xsan Admin to manage users and groups. If you have a different directory configuration, use the management software for your directory to delete groups. Delete a group: 1 In Xsan Admin, select Users and Groups in the SAN Assets list. 2 Select the group in the list and choose Delete User or Group from the Action pop-up menu (gear). Change group membership You can use Xsan Admin to change the members of a group at any time. Note: These instructions apply only if, during initial SAN setup, you chose to use Xsan Admin to manage users and groups. If you have a different directory configuration, use the management software for your directory to modify group membership. Change a group’s membership: 1 In Xsan Admin, select Users and Groups in the SAN Assets list. 2 Select the group in the list and click the Edit button in the lower-right corner of the window. 3 Select the checkbox next to a user to add the user to the group, or deselect the checkbox to remove the user. 4 Click OK. Configure local home folders for network accounts Using a network account server (or directory server) simplifies the job of managing user accounts for client computers attached to the SAN. However, some apps, such as Final Cut Pro, work best when a user’s home folder is on the client computer. User accounts that you manage with Xsan Admin are set up with local home folders. If your SAN users have accounts on another directory server and they have network home folders, you can set up local home folders for them. Configure a local home folder with Server If a Mac with Mac OS X Lion Server provides your SAN’s user accounts, you can use the Server app to configure a local home folder for a network user. 1 Open the Server app and connect to the Mac that has Lion Server and provides your SAN’s network accounts. 2 Select Users in the Server sidebar, select the user whose home folder you want to create, and choose Edit User from the Action pop-up menu (gear). 96 Chapter 6 Manage clients and usersChapter 6 Manage clients and users 97 3 Choose Local Only from the Home Folder pop-up menu. If you don’t see a Home Folder pop-up menu above the Groups field, all users have local home folders. The Home Folder pop-up menu isn’t shown unless the network account server is configured to provide network home folders. Configure a local home folder with Workgroup Manager: 1 Open Workgroup Manager and authenticate to your SAN’s Open Directory master. If the computer you’re using has Mac OS X Lion Server but doesn’t have Workgroup Manager, you can install it. Workgroup Manager is available for Lion Server as part of the Server Admin Tools, which you can download from the AppleCare Support Downloads website at www.apple.com/support/downloads/. 2 Click the Users tab, select a user, and click Home. 3 If /Users appears in the list of home locations, select it and click Save. If /Users isn’t in the list, click the Add button (+), and then enter the following in the Full Path field (replacing shortname with the user’s short name): /Users/shortname Leave all other fields blank, click OK, and then click Save. The user’s home folder is created on the client the first time the user logs in. Control client and user access To control access to information on SAN volumes, you can:  Use the Finder’s Get Info window to apply basic access controls to a file or folder.  Use Xsan Admin or the Server app to apply a full set of access control list restrictions.  Use Xsan Admin to unmount a SAN volume from selected client computers (volume-level control).  Remove a client from a SAN (SAN-level control). Control file and folder access using the Finder To restrict access to a file or folder on an Xsan volume, you can use the Get Info window in the Finder. Assign permissions using the Finder: m In a Finder window, select the file or folder, choose File > Get Info, and look under Sharing & Permissions. Control file and folder access using Xsan Admin To restrict user access to specific items on a SAN volume, you can use Xsan Admin to adjust permissions using standard POSIX permissions and access control lists (ACLs).Assign permissions using Xsan Admin: 1 Make sure ACLs are enabled on the volume. For help, see “Enable or disable access control lists” on page 82. 2 In Xsan Admin, select File Management in the SAN Assets list. 3 Select the file or folder you want to protect, and choose Set Permissions from the Action pop-up menu (gear). For more information about file and folder permissions, open the Server app on a SAN computer that has Mac OS X Lion Server, or a SAN computer that has Mac OS X Lion and has the Server app installed for remote server administration, and then search Server Help. Unmount a volume on a client You can unmount a volume from a client computer. A user whose client computer has Mac OS X Lion can also unmount a SAN volume by using the Xsan pane of System Preferences, provided the user knows an administrator name and password for the client computer. A user can also unmount a SAN volume from a client computer temporarily by ejecting it in the Finder, but the volume remounts after a few moments. Select to view computers that have the volume mounted. Select the volume. Unmount button Unmount a volume: 1 In Xsan Admin, select Mounts in the SAN Assets list. 2 Choose the volume from the Volume pop-up menu. 3 Select the client in the list and click the Unmount button. 98 Chapter 6 Manage clients and usersChapter 6 Manage clients and users 99 To select more than one client, hold down the Command or Shift key as you select clients in the list. Remove a client from a SAN You can remove a client computer from a SAN to prevent it from accessing SAN volumes. Select to view computers already in the SAN. Action menu Remove a client from a SAN: 1 In Xsan Admin, select Computers in the SAN Assets list, select the client, and choose “Remove computer from SAN” from the Action pop-up menu (gear). If SAN volumes are mounted on the client, Xsan Admin unmounts them. If you can’t choose “Remove computer from SAN,” make sure all Xsan clients and metadata controllers are turned on and their status is Ready in Xsan Admin’s Computers list. 2 To prevent the client from appearing in the Xsan Admin’s list of computers that can be added to the SAN, do one of the following:  If the client computer has Mac OS X Lion or Lion Server, open System Preferences on the client, click Xsan, and then click Disable Xsan.  If the client computer has Mac OS X or Mac OS X Server v10.6 Snow Leopard, remove the Xsan software by inserting the Xsan Install Disc for Xsan 2.2 in the client computer, opening the Other Installs folder, and double-clicking Uninstall Xsan.mpkg.3 To prevent any possible connection to the SAN, physically disconnect the client computer from the SAN’s Ethernet and Fibre Channel networks. Map Windows user and group IDs You can use the Windows ID Mapping setting for a volume to specify how Windows clients map user and group information to Xsan-compatible user IDs (UIDs) and group IDs (GIDs), which they need in order to access Xsan volumes. Note: To use ID mapping, Windows clients must be running StorNext 2.7. Windows clients can use these methods to provide UIDs and GIDs: Generate IDs from GUID: Windows clients dynamically generate UIDs and GIDs based on Globally Unique Identifier (GUID) information in an Active Directory domain. Choose this method if Macs on the SAN are connected (bound) to Active Directory with the default binding options, which automatically generate IDs. Use IDs from LDAP (RFC 2307): Windows clients get UID and GID values from the uidNumber and gidNumber attributes in Active Directory records. Choose this method if Macs on the SAN are connected to Active Directory with binding options set to map IDs to uidNumber and gidNumber. Important: To avoid ID conflicts, be sure all computers on the SAN use the same Active Directory domain and the same method of ID mapping. Select the Windows ID mapping method: 1 In Xsan Admin, select Volumes in the SAN Assets list, and choose Edit Volume Settings from the Action pop-up menu (gear). 2 Choose a mapping method from the Windows ID Mapping pop-up menu. If you choose “Use IDs from LDAP (RFC 2307),” you can change the ID numbers used when a directory record doesn’t include a uidNumber or gidNumber attribute. 3 Click OK. Xsan Admin unmounts the volume from clients and controllers and stops the volume before changing the Windows ID mapping method, and then starts the volume and mounts it on each computer that had it mounted. Set SAN user and group quotas You can use Xsan Admin to set quotas on the amount of storage available to a user or group. Note: A group quota includes only folders and files the group owns. Basic access permissions for a folder or a file determine its owner. You can view basic access permissions for an item in the Finder’s Get Info window. For instructions, see “Control file and folder access using the Finder” on page 97. 100 Chapter 6 Manage clients and usersChapter 6 Manage clients and users 101 Set a storage quota for a user or group: 1 In Xsan Admin, select Users and Groups in the SAN Assets list. If you’re not using Xsan Admin to manage users and groups, you’ll see Quotas in the SAN Assets list instead of Users and Groups. 2 Choose a volume from the Volume pop-up menu. 3 Select a user or group in the list. To select multiple users or groups, hold down the Command or Shift key as you select users or groups in the list. To add a user or group, click the Users button or Groups button above the list and then click the Add button (+). 4 Click the Edit button. 5 Enter a hard quota, soft quota, and grace period, and then click OK.Remove a quota: m Select the user or group and choose Delete Quota from the Action pop-up menu (gear). If your Xsan computers connect to another Mac server for user and group accounts, use the Server app or the Workgroup Manager app to create users and groups as needed. The Server app is included with Mac OS X Lion Server. Workgroup Manager is available for Lion Server as part of the Server Admin Tools, which you can download from the AppleCare Support Downloads website at www.apple.com/support/downloads/. If existing users and groups aren’t listed when you click the Add button, open the Users & Groups pane of System Preferences on your computer and make sure it’s connected to the correct network account server (directory server). All computers in the SAN should use the same directory server. From the command line You can also set user quotas using the cvadmin quotas set command in Terminal. For information, see the cvadmin man page or “View or change volume and storage pool settings (cvadmin)” on page 145. About Xsan quotas Xsan enforces two disk space quotas for each user or group you choose to restrict: a soft quota and a hard quota. You can set these in combination to establish clear limits on the amount of storage a user or group can use, while still allowing temporary access to extra space for unexpected storage needs. You specify quotas individually for each volume on a SAN. A user who has no quotas specified can use all the available space on a volume. Soft quota The soft quota is the maximum amount of space a user or group is expected to occupy on a regular basis. It’s soft because it can be exceeded by an amount up to the hard quota for a grace period that you specify. Hard quota The hard quota is an absolute limit on the amount of space a user or group can occupy. Users are prevented from using more space than specified by their hard quota. Grace period Users and groups can exceed the soft quota without penalty, as long as each returns below the soft quota within the grace period you specify. 102 Chapter 6 Manage clients and usersChapter 6 Manage clients and users 103 Soft quotas change to hard quotas If a user or group exceeds the soft quota for a time longer than the grace period, the soft quota is changed to a hard quota. The user or group can’t save additional data on the volume until the user or the group members delete enough old files to bring their usage below the soft quota. Example Suppose you assign Aldo a soft quota of 75 GB, a hard quota of 100 GB, and a grace period of 48 hours. Aldo’s files can occupy up to 75 GB of space at any time, for as long as he needs them. If Aldo is surprised by additional or unusually large files, he can still copy them to the volume, up to a total of 100 GB. He then has 48 hours to remove files and return below the 75 GB soft quota. If he’s still using more than 75 GB after 48 hours, Xsan resets his hard quota to 75 GB and he’s forced to reduce his storage use. Aldo can’t copy or save additional files to the volume until he deletes enough to return below the 75 GB quota. Define SAN users consistently for accurate quotas To be sure that Xsan user quota information is accurate, make sure user names and IDs are consistent on all computers on the SAN. Check user quota status You can use Xsan Admin to check file system quotas and see how much of their allotment users and groups are using. Hard quota (right end of bar) Soft quotas (vertical lines)View quota status: m In Xsan Admin, select “Users and Groups” or Quotas in the SAN Assets list. (You see Users and Groups only if you chose to have Xsan Admin manage your users and groups. Otherwise, you see Quotas.) To see current information, click Refresh at the top of the window. Xsan Admin displays the following information for each user or group: Used: The amount of space the user’s files are occupying. Quota: The soft and hard quotas. For example, “75 MB – 100 MB” indicates a soft quota of 75 MB and a hard quota of 100 MB. Quota Status: The status bar represents the full allocation, from zero on the left to the hard quota on the right. The small vertical line on the bar marks the soft quota. The colored portion of the bar shows how much space the user or group is using. Green indicates that the user or group is below the soft quota. Yellow indicates usage exceeding the soft quota but for a time within the grace period. Red indicates that the user has reached the hard quota, possibly because the soft quota was exceeded beyond the grace period and was changed to a hard quota. You can set up Xsan to notify you by email or text message when a user or group exceeds a soft quota. See “Set up status notifications” on page 119. For more information about quotas and how to set them, see “Set SAN user and group quotas” on page 100. From the command line You can also check user quotas using the cvadmin quotas get command in Terminal. For information, see the cvadmin man page or “View or change volume and storage pool settings (cvadmin)” on page 145. Help users check quotas SAN users who work on client computers but don’t have access to Xsan Admin can use the quota command-line tool to check their quotas. Check a user’s quota from a client computer: 1 Open the Terminal app (in the /Applications/Utilities/ folder). 2 Enter quota -u -g -v and press Return. The quotas for the user and for groups the user belongs to are displayed in a table. The first column reports the volume name. The second column reports how much space the user or group is using on the volume, suffixed with an asterisk if the usage is over the soft limit. The third column reports the soft quota. The fourth column reports the hard quota. Usage and quotas are reported in 1 KB blocks. To see the user quota without the group quotas, omit -g when you enter the command. 104 Chapter 6 Manage clients and usersChapter 6 Manage clients and users 105 Manage client computers remotely Xsan Admin can help you connect to an Xsan client computer so you can observe or control it over the network. Using Xsan Admin, you can:  Start a screen sharing session so you can observe or control another computer.  Open Terminal so you can log in using SSH and control another computer. You can also connect and manage a server in the SAN by using the Server app on a computer that has it installed. Connection options Action menu Control a client using screen sharing You can use the screen sharing feature of Mac OS X to view and control the screen of a SAN client over the network. Xsan Admin can start a screen sharing session with the client. Connect to a client using screen sharing: 1 In Xsan Admin, select Computers in the SAN Assets list. 2 Select the client you want to observe or control. 3 Choose “Connect Using Screen Sharing” from the Action pop-up menu (gear).If you have trouble sharing the screen of a remote computer, check the Sharing pane of System Preferences on the remote computer to make sure Remote Management service is turned on. If you have trouble starting a screen sharing session with an Xsan client, open the Security pane of System Preferences on the client, click Firewall, and make sure the option to block all incoming connections isn’t selected. Connect to a client using SSH in terminal You can use the Secure Shell (SSH) command-line tool to log in to a SAN client over the network. Xsan Admin can start an SSH session with the client or controller. Connect to a client using SSH: 1 In Xsan Admin, select Computers in the SAN Assets list. 2 Select the client you want to connect to. 3 Choose “Connect using ssh” from the Action pop-up menu (gear). If you have trouble making an SSH connection, check the Sharing pane of System Preferences on the remote computer to make sure Remote Login service is turned on. If you have trouble making an SSH connection with an Xsan client, open the Security pane of System Preferences on the client, click Firewall, and make sure the option to block all incoming connections isn’t selected. 106 Chapter 6 Manage clients and users107 To increase SAN security and redundancy, you can add, switch, and monitor Xsan metadata controllers. Every SAN volume you set up is managed by a metadata controller. To be sure that the volume is available to clients even if the primary metadata controller becomes unresponsive, you can set up standby controllers, one of which will assume control of the volume if the primary controller fails. This chapter shows you how to add metadata controllers, set their failover priority, and force volume failover from the primary controller to a standby controller. Add a metadata controller You can add standby metadata controllers to a SAN so that volumes remain available if the primary metadata controller fails. 7 Manage metadata controllersImportant: For best performance, metadata controllers should have Mac OS X Lion Server, and the “Dedicate system resources to server services” option should be turned on in the Server app. Add button Select to view computers already in SAN. Add a metadata controller: 1 Connect the new controller computer to the SAN’s Fibre Channel and Ethernet networks. 2 Open System Preferences, click Xsan, and click Enable Xsan. 3 Open Xsan Admin, select Computers in the SAN Assets list, and then click the Add button (+). 4 When the assistant opens, select the new controller computer in the computer list and click Continue. If the computer doesn’t appear in the list, click Add Remote Computer and add it. 5 On the Authenticate Clients pane, enter the administrator user name and password for the computer. 6 On the Choose Metadata Controllers pane, select the checkbox next to the computer in the list and click Continue. After you add a controller to the SAN, volumes that are mounted on all other controllers are mounted automatically on the new controllers. Volumes that are mounted only on some controllers aren’t mounted automatically on the new controller, but you can mount those volumes manually by selecting Mounts in the SAN Assets list. 108 Chapter 7 Manage metadata controllersChapter 7 Manage metadata controllers 109 Set controller failover priority When the primary metadata controller for a volume fails, Xsan uses the failover priorities of the available standby controllers to decide which one to switch to. Different volumes can be hosted by different metadata controllers, and you can choose a failover priority for each volume. Set a metadata controller’s failover priority: 1 Open Xsan Admin, select Volumes in the SAN Assets list, and select a volume in the list. 2 Choose Edit Failover Priority from the Action pop-up menu (gear). 3 Drag metadata controllers up or down in the list that appears. The closer a metadata controller is to the top of the list, the more likely it is that it will host the volume. 4 Click OK. Switch to a standby metadata controller You can use Xsan Admin to force an active metadata controller to turn over control of a volume to a standby controller. Force failover to a standby metadata controller: 1 Open Xsan Admin and select Volumes in the SAN Assets list. 2 Select the volume in the list and choose “Force failover” from the Action pop-up menu (gear). From the command line You can also switch a volume to a standby metadata controller using the cvadmin fail command in Terminal. For information, see the cvadmin man page or “View or change volume and storage pool settings (cvadmin)” on page 145.Find out which controller is hosting a volume Control of a volume can move from one metadata controller to another as a result of controller failover. You can use Xsan Admin to find out which metadata controller is hosting a volume. The controller that is currently hosting the volume View a volume’s metadata controller: m In Xsan Admin, select Volumes in the SAN Assets list and look in the Hosted By column. From the command line You can also find out which metadata controller is hosting a volume by using the cvadmin command-line tool in Terminal. Open Terminal on the controller and enter: $ sudo cvadmin -e select For more information, see the cvadmin man page or “View or change volume and storage pool settings (cvadmin)” on page 145. List the volumes hosted by a controller You can use Xsan Admin or the cvadmin command-line tool to find out which SAN volumes are being hosted by a metadata controller. List hosted volumes: m In Xsan Admin, select Volumes in the SAN Assets list, and click the title of the Hosted By column to sort by controller. 110 Chapter 7 Manage metadata controllersChapter 7 Manage metadata controllers 111 From the command line You can also find out which volumes are hosted by a metadata controller using the cvadmin select command in Terminal. For information, see the cvadmin man page or “View or change volume and storage pool settings (cvadmin)” on page 145. Change a controller’s IP address Follow these instructions to change the IP address of an Xsan metadata controller. WARNING: To avoid losing data on volumes hosted by the primary metadata controller, you must have a standby metadata controller available for each volume. Change a metadata controller’s IP address: 1 In Xsan Admin, select Computers in the SAN Assets list. 2 If you’re changing the primary metadata controller’s IP address, select a standby metadata controller, and choose Make Primary Controller from the Action pop-up menu. 3 Select the controller whose IP address you wish to change, and choose “Remove Computer from SAN” from the Action pop-up menu (gear). 4 Change the computer’s IP address in the Network pane of System Preferences. 5 Open the Server app, click Alerts, select the alert about the network configuration change, and click Recover to update the service configuration files. You can also manually update the service configuration files from the command line by entering: $ sudo changeip oldIP newIP Replace oldIP with the server’s old IP address, and replace newIP with the server’s new IP address. 6 Restart the computer. 7 With its new address, add the computer back to the SAN as a metadata controller. In Xsan Admin, select Computers in the SAN Assets list and click the Add button (+). If you want to switch control of a volume hosted by the standby controller back to the controller with the new IP address, select the volume in the Volumes pane of Xsan Admin and choose “Force failover” from the Action pop-up menu (gear). You can also force failover from the command line by entering: $ sudo cvadmin -e "fail volume" Replace volume with the name of the Xsan volume.Make a standby controller the primary controller Make a standby metadata controller the primary metadata controller: 1 In Xsan Admin, select Computers in the SAN Assets list. 2 Select the standby metadata controller you want to promote, and choose Make Primary Controller from the Action pop-up menu. Convert a controller to a client If you no longer want a computer to act as a metadata controller for SAN volumes, you can demote the controller to a SAN client. Convert a metadata controller to a client: m In Xsan Admin, select Computers in the SAN Assets list, select the metadata controller in the list, and choose Make Client from the Action pop-up menu (gear). If you can’t choose Make Client, make sure all Xsan clients and metadata controllers are turned on and their status is Ready in Xsan Admin’s Computers list. You can’t demote the primary metadata controller if it’s managing users and groups. Access controller computers remotely Xsan Admin can help you connect to an Xsan metadata controller so you can observe or control it over the network. Using Xsan Admin, you can:  Start a screen sharing session so you can observe or control another computer.  Open Terminal so you can log in using SSH and control another computer. 112 Chapter 7 Manage metadata controllersChapter 7 Manage metadata controllers 113 You can also connect and manage a server in the SAN by using the Server app on a computer that has it installed. Connection options Action menu Control a controller using screen sharing You can use the screen sharing feature of Mac OS X to view and control the screen of a SAN metadata controller over the network. Connect to a metadata controller using screen sharing: 1 In Xsan Admin, select Computers in the SAN Assets list. 2 Select the metadata controller you want to observe or control. 3 Choose “Connect using Screen Sharing” from the Action pop-up menu (gear). If you have trouble sharing the screen of a remote computer, check the Sharing pane of System Preferences on the remote computer and make sure Remote Management service is turned on. If the computer is a Mac server, you can also turn on remote management in the Server app or Server Admin. The Server app is included with Mac OS X Lion Server, and Server Admin is included with Mac OS X Server v10.6 Snow Leopard and earlier. Connect to a controller using SSH in Terminal You can use the Secure Shell (SSH) command-line tool to log in to a SAN metadata controller over the network.Connect to a metadata controller using SSH: 1 In Xsan Admin, select Computers in the SAN Assets list. 2 Select the metadata controller you want to connect to. 3 Choose “Connect using ssh” from the Action pop-up menu (gear). If you have trouble making an SSH connection, check the Sharing pane of System Preferences on the remote computer and make sure Remote Login service is turned on. If the computer is a Mac server, you can also turn on remote login in the Server app or Server Admin. The Server app is included with Mac OS X Lion Server, and Server Admin is included with Mac OS X Server v10.6 Snow Leopard and earlier. Monitor controller status For information about checking or reporting the status of a controller, see these topics:  “Graph SAN resource usage” on page 118  “Set up status notifications” on page 119  “View Xsan logs” on page 120 114 Chapter 7 Manage metadata controllers115 You can use Xsan Admin and related command-line tools to check the condition of a SAN and its components. This chapter shows you how to check the status of a SAN and its volumes and how to set up notifications so you’ll be alerted to changes in the SAN. Check SAN status You can use Xsan Admin to view status and configuration information for the SAN and its components. View the overall status of the SAN: m Open Xsan Admin and select Overview in the SAN Assets list. 8 Monitor SAN statusView a component’s status and configuration information: m Open Xsan Admin, click the Inspector button at the top of the window, and then select the component in the SAN Assets list or in the main pane of the Xsan Admin window. Check volume status You can use Xsan Admin to view the status of a volume. View the status of a volume: m Open Xsan Admin, select Volumes in the SAN Assets list, select the volume, and click the Inspector button at the top of the window. You can also double-click the volume. Monitor RAID devices If a RAID array that belongs to an Xsan volume becomes damaged and unrecoverable due to a failed disk drive or other hardware failure, the data on the volume could be lost. To avoid this possibility, regularly check the state of your RAID hardware. Your RAID system management software might be able to notify you when the state of a drive module or array changes. See the documentation that came with your RAID system. 116 Chapter 8 Monitor SAN statusChapter 8 Monitor SAN status 117 Check free space There are several ways to see how much space is available on a SAN volume or on storage pools in a volume. Available space Check the free space on a volume: m From a client or controller computer that has the volume mounted, select the volume in a Finder window, and look at the size information at the bottom of the window (in Column or List view) or choose File > Get Info. You can also use Disk Utility. m From a computer that has Mac OS X Lion Server but doesn’t have the volume mounted or doesn’t belong to the SAN, open Xsan Admin, click Volumes in the SAN Assets list, look for the volume, and then look at the Available column. The reported size and free space for an Xsan volume doesn’t include space in storage pools that contain only journal data and metadata. Only space on storage pools where users can store files is counted (that is, storage pools set to be used for “Any data” or “User data only”). For example, if you create a volume consisting of four 120 GB storage pools and configure one for journal and metadata only, Xsan Admin reports the size of the volume as 360 GB, not 480 GB. Check the free space on a storage pool: m Open Xsan Admin, select Volumes in the SAN Assets list, look for the storage pool, and then look at the Available column.If you don’t see the storage pools for a volume, click the volume’s disclosure triangle. From the command line You can also check volume free space using the cvadmin stat command, and you can check storage pool free space using the cvadmin show command. For information, see the cvadmin man page or “View or change volume and storage pool settings (cvadmin)” on page 145. Graph SAN resource usage Xsan Admin can display graphs of up to a week of CPU, memory, Ethernet, and Fibre Channel usage data for any computer on the SAN. Choose a SAN computer. Choose a time period. Choose a data type. View usage graphs: m In Xsan Admin, click the Graphs button at the top of the window and use the three pop-up menus in the Graphs window to choose a computer, a data type, and a time interval. Memory and CPU resources used by the file system process (fsm) for a volume are listed under the name of the volume in the Graphs pop-up menu when you choose the volume’s controller from the Computer pop-up menu. From the command line You can also check the file system process’s current CPU and memory usage by using the top command-line tool in Terminal to check the process named fsm on the volume’s controller. For information, see the top man page. 118 Chapter 8 Monitor SAN statusChapter 8 Monitor SAN status 119 Set up status notifications You can set up Xsan to send an email or a text message to notify you or other administrators when:  A controller switches to its backup  A Fibre Channel connection fails  Free space on a volume falls below a specified percentage  A user or group exceeds the designated soft quota To send email notifications outside the local network, the controller needs access to an SMTP server. Set up status notifications: 1 Open Xsan Admin and select Overview in the SAN Assets list. 2 Choose Edit Notifications Settings from the Action pop-up menu (gear). 3 To add a contact, click the Add button (+) and enter an email address. 4 If the address is for an account that will forward the notification as a text message, click the checkbox in the Text Msg column. 5 Choose the conditions that cause a notification to be sent (next to “Notify if”). 6 Enter a sender name. 7 Enter the mail server address in the SMTP Server field. 8 To send a test message to all recipients, click Send Test Notification. 9 Adjust settings as necessary, and then click OK.View Xsan logs You can use Xsan Admin to view the informational and diagnostic messages that Xsan writes to the SAN logs.Fibre Channel connection failures or errors are recorded in the system log. Choose a SAN computer. Location of the selected log file Type to search for entries containing specific text. View the SAN logs: m In Xsan Admin, click the Logs button at the top of the window, and then in the Logs window that appears, use the Computer and Log pop-up menus to choose the log you want to view. To display entries containing a specific name, time, or other text, type in the Search field in the lower-right corner of the window. Check for Fibre Channel connection failures: 1 In Xsan Admin, click the Logs button at the top of the window. 2 In the Logs window that appears, choose the computer in the Computer pop-up menu and choose System Log from the Log pop-up menu. From the command line To see the log for a volume from the command line, look at the log file /Library/Logs/ Xsan/data/volume/log/cvlog. The port mapper process log is in /Library/Logs/Xsan/debug/nssdbg.out. The system log is in /var/log/system.log. 120 Chapter 8 Monitor SAN statusChapter 8 Monitor SAN status 121 Check volume clients You can use Xsan Admin to see a summary of which clients are using a volume. Select to see which computers have a volume mounted. Choose a volume. See how many clients have a volume mounted: m Open Xsan Admin, select Volumes in the SAN Assets list, select the volume in the list, and click the Inspector button at the top of the window. See which clients are using a volume: m Open Xsan Admin, select Mounts in the SAN Assets list, and choose the volume from the Volume pop-up menu. From the command line You can also use the cvadmin who command in Terminal to see a list of volume clients. For information, see the cvadmin man page or “View or change volume and storage pool settings (cvadmin)” on page 145.122 Use this chapter to find solutions to common problems you might encounter while working with a SAN. Look here for solutions to common problems you might encounter while setting up, managing, or using an Xsan SAN. If you can’t connect to a computer using Xsan Admin If there’s a firewall between the computer you’re using Xsan Admin on and the SAN computer, make sure TCP port 311 is open on the firewall. If you can’t enable or install the Xsan software If you want to use Xsan on a computer with Mac OS X Lion or Lion Server, but you don’t see the Xsan pane in System Preferences, make sure the computer has a Fibre Channel interface. If you can’t install Xsan using an Xsan Install Disc for Xsan 2.2, make sure the computer has Mac OS X or Mac OS X Server v10.6 Snow Leopard. Mac OS X Lion includes Xsan 2.3, so you can’t use the Xsan Install Disc with it. You can’t use Mac OS X or Mac OS X Server versions earlier than v10.6 with Xsan 2.3. If computers aren’t listed in Xsan Admin If a computer you want to add to the SAN as a metadata controller or client isn’t listed in Xsan Admin, make sure:  You’ve enabled the Xsan software on the computer.  The computer is turned on.  The computer isn’t in sleep. 9 Solve SAN problemsChapter 9 Solve SAN problems 123  The computer is on the same TCP/IP subnets as the other SAN components. (If you’re using a private and a public Ethernet network, all SAN components must be connected to both networks.)  The computer is connected to the SAN’s Fibre Channel networks. If you can’t mount a volume on a client  Restart the client computer, and then try mounting the volume again.  Check that all Fibre Channel cables are plugged in.  Make sure that no other volumes mounted on the client have the same name as the Xsan volume. If you can’t unmount a volume on a client  Make sure no processes are using the volume.  Restart the client computer, and then try unmounting the volume again. If RAID LUNs aren’t accessible over Fibre Channel  Restart the computer that doesn’t see the LUNs.  Check the configuration of the Fibre Channel switch to be sure the SAN computers and storage devices are in the same Fibre Channel zone. If you have problems using command-line tools If you get the response “insufficient administrator privileges” when you run the cvadmin command-line tool, make sure you have root user privileges when you use the tool. Log in as the root user or use the sudo command to run the tool. For example: $ sudo cvadmin If a LUN doesn’t have as much space as expected To make striping across all LUNs possible, Xsan adjusts LUN sizes to make LUNs in a storage pool the same size as the smallest LUN in the pool. Xsan doesn’t use the extra space on larger LUNs if you mix LUNs of different sizes in a storage pool. If you can’t rename an Xsan volume in the Finder Xsan doesn’t let a mounted Xsan volume be renamed using the Finder, but you can use Xsan Admin to rename the volume. See “Rename a volume” on page 85.If you can’t add a storage pool Some words are reserved and can’t be used to name a storage pool. If a storage pool is used for user data, the first eight characters of the storage pool name can’t be a reserved word. If you enter a reserved word as the storage pool name, the OK button in the storage pool sheet is dimmed. Examples include: Affinity, Exclusive, Journal, Log, MetaData, Regular, and Type. For a register of reserved words, see the cvfs_config man page by entering this command in Terminal: $ man -M /System/Library/Filesystems/acfs.fs/Contents/man/ 4 cvfs_config If Fibre Channel performance is poor With some Fibre Channel switches, mismatched optical transceivers (GBICs) can cause Fibre Channel communication errors and degrade SAN performance. Check with the manufacturers of your Fibre Channel switches to see if you should use identical transceivers (same manufacturer and model number) on both ends of your Fibre Channel cables. However, with Cisco Fibre Channel switches, you should use a Cisco transceiver on the end of a cable that plugs into the switch and another qualified transceiver at the other end of the cable. For Fibre Channel hardware compatibility information, see the AppleCare Support article at support.apple.com/kb/HT1769. If a client can’t use a volume after a Fibre Channel interruption If a client loses its Fibre Channel connection to the SAN (for example, because a cable is unplugged), the client might not recognize LUNs in an Xsan volume after the connection is restored. If this happens, restart the client to remount the volume. If problems persist, restart all SAN devices. Restart RAID systems first, then continue with SAN controllers, and finally, restart all clients. Check whether a computer is seeing Xsan volume LUNs: m Open Disk Utility on the computer and look for the LUNs in the list of disks and volumes. From the command line You can also check for accessible LUNs using the cvlabel -l command or the diskutil list command in Terminal. For information, see the cvlabel or diskutil man page. 124 Chapter 9 Solve SAN problemsChapter 9 Solve SAN problems 125 If you can’t add LUNs to a storage pool You can’t add a LUN to a storage pool unless the LUN is at least as large as the smallest LUN you added when you created the pool. You can add a larger LUN, but space beyond the smallest LUN size isn’t used. You can only expand storage pools that can be used for user data. You can’t add a LUN to a storage pool if the storage pool is used only for journaling and metadata. To add journaling and metadata storage, add another storage pool that can be used for journaling and metadata. Xsan also won’t let you add a LUN to a storage pool if adding the LUN will fragment the storage pool so much that performance suffers. Check the common LUN size for a storage pool: m In Xsan Admin, select Volumes in the SAN Assets list and click disclosure triangles in the list of volumes to show the LUNs in the storage pool of interest. Compare the listed LUN sizes. Check the data types a storage pool is used for: m In Xsan Admin, select Volumes in the SAN Assets list then click disclosure triangles in the list of volumes to show the storage pool of interest. Double-click the storage pool in the list and look next to “Used For” in the Inspector window. If the capacity of a larger LUN is Listed as 2 terabytes If a LUN that doesn’t yet belong to a storage pool is listed in Xsan Admin with a capacity of 2 TB, even though you know it’s larger (which can happen if you used the LUN with an earlier version of Xsan), try relabeling the LUN. Relabel a LUN: 1 In Xsan Admin, select LUNs in the SAN Assets list. 2 Click LUNs, select the LUN in the list, and choose “Remove LUN label” from the Action pop-up menu (gear). 3 With the LUN still selected, choose “Change LUN label” from the Action pop-up menu, and enter a label. If file copying doesn’t finish If the Ethernet connection to a metadata controller is lost, Finder file-copy operations in progress on clients might not finish, even though the volume successfully fails over to a standby controller. Let the copy operation finish: m Reconnect the disconnected controller to the SAN’s Ethernet network.If a volume unexpectedly restarts Xsan can restart a volume for a variety of reasons, including controller restart and volume failover. The notification is the same in all cases, but you can examine the log files for more details. View the logs: 1 Open Xsan Admin and click the Logs button at the top of the window. 2 In the Logs window that appears, use the Computer and Log pop-up menus to choose a log. 126 Chapter 9 Solve SAN problems127 This appendix shows you how to upgrade your Xsan 2 SAN to Xsan 2.3. Follow the instructions in this appendix to upgrade an existing Xsan 2 SAN and its volumes to Xsan 2.3. Upgraded metadata controllers must have Mac OS X Lion Server. Upgraded SAN clients must have Mac OS X Lion or Lion Server, which include Xsan 2.3, or Mac OS X or Mac OS X Server v10.6 with Xsan 2.2.1 or later installed. Before you begin Review the following information before you upgrade your SAN. If you’re not running Xsan 2.0 or later This appendix shows you how to upgrade from Xsan 2.0 or later. For help upgrading from an earlier version of Xsan, see the Xsan 2 Migration Guide, Second Edition, available at www.apple.com/xsan/resources/. Lion or Lion Server? The Xsan file system is included with Mac OS X Lion and Lion Server. The Xsan Admin app is included with Mac OS X Lion Server. Unless otherwise indicated, a statement in this appendix about Mac OS X Lion also applies to Mac OS X Lion Server. However, if you use Xsan Admin to manage SAN users and groups, you must have Mac OS X Lion Server on your metadata controllers to create the Open Directory master and its replicas. Which procedure? This appendix contains two sets of instructions:  Follow “Upgrade your SAN software” below if you want to upgrade your current metadata controllers to Xsan version 2.3 and Mac OS X Lion Server.  Follow “Upgrade SAN hardware and software” on page 132 if you need to replace your current metadata controllers with Intel-based computers in addition to upgrading to Xsan 2.3 and Mac OS X Lion Server. A Appendix Upgrade to Xsan 2.3128 Appendix A Upgrade to Xsan 2.3 Version compatibility For information about the compatibility of Xsan 2.3 metadata controllers and clients with earlier Xsan versions and with StorNext controllers and clients, see “Version compatibility” on page 13. Upgrade your SAN software Follow these instructions if you want to keep using your current metadata controllers and upgrade them to Xsan 2.3 and Mac OS X Lion Server. If you need to replace your metadata controllers, follow the instructions in “Upgrade SAN hardware and software” on page 132. The instructions in this section show you how to upgrade your SAN’s metadata controllers one at a time so that existing volumes remain available. As each controller is upgraded, volumes it is hosting fail over to standby controllers. However, if you enable extended attributes on a volume after upgrading to Xsan 2.3, the volume is not mounted on clients until the conversion process finishes. This process can take hours, depending on the number of files on the volume; the volume is not available during this time. Summary: 1 Back up your SAN volumes. 2 Disable Spotlight on all volumes. 3 Upgrade the primary controller to Mac OS X Lion Server. 4 Upgrade the remaining controllers. 5 Reestablish Open Directory replicas. 6 Upgrade the SAN clients. 7 Enable extended attributes. 8 Change filename case sensitivity. 9 Reenable Spotlight. Instructions for these steps are on the following pages. Step 1: Back up your SAN volumes Before you begin, make a backup copy of the files on your SAN volumes. Step 2: Disable Spotlight on all volumes Before upgrading your SAN computers to Mac OS X Lion or Lion Server, disable Spotlight on all Xsan volumes during the upgrade.Appendix A Upgrade to Xsan 2.3 129 Disable Spotlight on a volume: 1 Open your current version of Xsan Admin. 2 In Xsan Admin, select Volumes in the SAN Assets list. 3 Select the volume and choose Edit Volume Settings from the Action pop-up menu (gear). 4 Click to deselect “Enable on this volume” next to Spotlight. Step 3: Upgrade the primary controller to Mac OS X Lion Server To upgrade to Xsan 2.3, you must upgrade your metadata controllers to Mac OS X Lion Server. Important: If you use Xsan Admin to manage SAN users and groups, upgrade your primary controller (the controller hosting the SAN’s Open Directory master) before you upgrade standby controllers. Identify your Open Directory primary controller: m If you’re using Xsan Admin to manage users and groups, open Xsan Admin, select Overview in the SAN Assets list, and look for the controller that has the user icon next to its name. Upgrade that controller first. Upgrade the controller to Mac OS X Lion Server: m Open the Mac App Store on the controller you want to upgrade, and purchase Mac OS X Lion. After you purchase Mac OS X Lion, the Mac OS X Install Assistant opens. It recognizes that you’re upgrading from Mac OS X Server v10.6, and upgrades to Lion Server. If the metadata controller you’re upgrading has Mac OS X Server v10.5, upgrade it to v10.6 before purchasing Mac OS X Lion. After upgrading Mac OS X Server v10.5 to v10.6:  Use Software Update to update to the latest version of Mac OS X Server v10.6  Use Software Update to update to Xsan 2.2.1 or later. You must update Xsan because there are underlying differences between Xsan 2.2 for Mac OS X Server v10.5 and Xsan 2.2 for Mac OS X Server v10.6. Upgrading to Mac OS X Lion Server upgrades Xsan to version 2.3. From this point forward, use Xsan Admin only on a computer with Mac OS X Lion Server. Step 4: Upgrade the remaining controllers Repeat step 3 on each additional SAN metadata controller. When all controllers have Mac OS X Lion Server, which includes Xsan 2.3, continue with the next step.130 Appendix A Upgrade to Xsan 2.3 Step 5: Reestablish Open Directory replicas If you don’t use Xsan Admin to manage SAN users and groups, skip to the next step. If you use Xsan Admin to manage SAN users and groups, you now have an Open Directory master on your primary controller (the first controller you upgraded in step 3). However, you must reestablish replicas of that directory on your other controllers. Recreate the directory replicas: m Open Xsan Admin on one controller and select Computers in the SAN Assets list. A dialog prompts you to recreate the replicas. If you’re not asked to replicate the directory, see if you have upgraded all controllers in the SAN to Mac OS X Lion Server, which includes Xsan 2.3, and then try again. If the replication prompt still doesn’t appear, select a controller in the Computers pane in Xsan Admin and choose Make Open Directory Replica from the Action pop-up menu (gear). Step 6: Upgrade the SAN clients When all SAN controllers have Mac OS X Lion Server, upgrade the SAN clients.  If you’re keeping client computers in the SAN, upgrade them to Mac OS X Lion or Lion Server.  If you aren’t upgrading a client computer, and it has Mac OS X or Mac OS X Server v10.6, upgrade it to Xsan 2.2.1 or later.  If a client computer has Mac OS X or Mac OS X Server 10.5 or earlier, you must upgrade it to v10.6 to use it in your Xsan 2.3 SAN.  If you have client computers with PowerPC processors, you can’t use them in your Xsan 2.3 SAN. You can replace them with Macs that have Intel processors and Fibre Channel ports or adapters. Upgrade Mac OS X and Xsan: m Open the Mac App Store on the client computer you want to upgrade, and purchase Mac OS X Lion. After you purchase Mac OS X Lion, the Mac OS X Install Assistant opens. It upgrades Mac OS X v10.6 to Mac OS X Lion, or Mac OS X Server v10.6 to Mac OS X Lion Server. If the client computer you’re upgrading has Mac OS X or Mac OS X Server v10.5, upgrade it to v10.6 before purchasing Mac OS X Lion. After upgrading to v10.6:  Use Software Update to update to the latest version of Mac OS X or Mac OS X Server v10.6  Use Software Update to update to Xsan 2.2.1 or later. You must update Xsan because there are underlying differences between Xsan 2.2 for Mac OS X v10.5 and Xsan 2.2 for Mac OS X v10.6.Appendix A Upgrade to Xsan 2.3 131 Upgrading to Mac OS X Lion or Lion Server upgrades Xsan to version 2.3. If SAN volumes don’t mount on a client upgraded to Mac OS X Lion or Lion Server, use the Xsan pane of System Preferences on the client to make sure Xsan is enabled. Upgrade Xsan only: m On a client computer with Mac OS X or Mac OS X Server v10.6, choose Software Update from the Apple menu and update to Xsan 2.2.1 or later. If the client computer has Mac OS X or Mac OS X Server v10.5 or earlier, you must upgrade it to v10.6 in order to use it in your Xsan 2.3 SAN. If Xsan Admin displays a message about “Incorrect Search Policy,” use the Login Options section of the Users & Groups pane of System Preferences (the Accounts pane in Mac OS X v10.6) to connect to the correct network account server (directory server). Step 7: Enable extended attributes If you have only Macs on your SAN, enable extended attributes on your SAN volumes to improve volume performance and efficiency. Important: Enabling extended attributes can’t be undone. WARNING: To avoid data loss, clients with Quantum’s StorNext File System (Windows, AIX, IRIX, Linux, and Solaris computers) must not access volumes that use extended attributes. Enable extended attributes: 1 Open Xsan Admin and select Volumes in the SAN Assets list. 2 Select the volume and choose Edit Volume Settings from the Action pop-up menu (gear). 3 Click to select “Enable on this volume” next to Extended Attributes. The time it takes to convert the volume to use extended attributes depends on the number of files on the volume—it might take several hours for a large volume. During this time, the volume is mounted only on the converting controller and can’t be used by clients. The volume is mounted on clients and other controllers when the conversion is finished. Step 8: Change filename case sensitivity If all your SAN computers have Mac OS X Lion or Lion Server, you can specify whether a volume ignores capitalization in filenames. For example, a volume can consider myfile, MyFile, and MYFILE to be the same or different filenames. For best performance with volumes that you share using the SMB protocol, make them case insensitive.132 Appendix A Upgrade to Xsan 2.3 Change filename case sensitivity for a volume: 1 In Xsan Admin, select Volumes in the SAN Assets list. 2 Select the volume and choose Edit Volume Settings from the Action pop-up menu (gear). 3 Select or deselect the checkbox next to Case Insensitivity and click OK. When you change case sensitivity, Xsan checks all existing filenames to make sure the change won’t result in filenames being considered the same. This check can take a while. If Case Insensitivity is selected, the volume considers filenames to be the same if they’re spelled alike but capitalized differently. If Case Insensitivity is not selected, the volume considers filenames to be different if they’re spelled alike but capitalized differently. Note: After you click OK, the volume is unmounted from all Xsan computers, and then remounted. Step 9: Reenable Spotlight If you disabled Spotlight to upgrade SAN computers to Mac OS X Lion or Lion Server, reenable it now. Enable Spotlight on a volume: 1 In Xsan Admin, select Volumes in the SAN Assets list. 2 Select the volume and choose Edit Volume Settings from the Action pop-up menu (gear). 3 Click to select “Enable on this volume” next to Spotlight. Upgrade SAN hardware and software Follow these instructions if, as part of your Xsan 2.3 upgrade, you must replace PowerPC-based computers with Intel-based computers. (Xsan 2.3 requires all SAN computers to have Intel processors.) Summary: 1 Back up your SAN volumes. 2 Disable Spotlight on all volumes. 3 Adjust volume failover priorities. 4 Convert all standby controllers to clients. 5 Unmount and stop all volumes. 6 Connect new computers to the SAN. 7 Migrate the primary controller to a new computer. 8 Migrate previous standby controllers to new client computers. 9 Convert clients to standby controllers.Appendix A Upgrade to Xsan 2.3 133 10 Migrate remaining SAN clients. 11 Enable extended attributes. 12 Change filename case sensitivity. 13 Reenable Spotlight. 14 Recreate your MultiSAN configuration. Step 1: Back up your SAN volumes Before you begin, make a backup copy of the files on your SAN volumes. Step 2: Disable Spotlight on all volumes Disable Spotlight on all Xsan volumes during the migration to new SAN computers. Disable Spotlight on all volumes: 1 In Xsan Admin, select Volumes in the SAN Assets list. 2 Select a volume and choose Edit Volume Settings from the Action pop-up menu (gear). 3 Click to deselect “Enable on this volume” next to Spotlight. 4 Repeat for all volumes in the SAN. Step 3: Adjust volume failover priorities If you use the MultiSAN capability of Xsan to host volumes on different subsets of the available controllers, adjust volume failover priorities so that all volumes can fail over to the primary metadata controller. Make sure all volumes will fail over to the new controllers: 1 Open Xsan Admin and select Volumes in the SAN Assets list. 2 Select a volume and choose Edit Failover Priority from the Action pop-up menu (gear). 3 Click to select the primary metadata controller in the list, and click OK. 4 Repeat for all volumes in the SAN. Step 4: Convert all standby controllers to clients Identify the primary metadata controller, and then convert all other metadata controllers to Xsan clients. If a metadata controller is hosting a volume when you convert it to a client, another metadata controller begins hosting the volume. When you finish this step, the primary metadata controller is hosting all SAN volumes. Identify the Open Directory primary controller: m If you’re using Xsan Admin to manage users and groups, open Xsan Admin, select Overview in the SAN Assets list, and look for the controller that has the user icon next to its name. Don’t convert that controller to a client.134 Appendix A Upgrade to Xsan 2.3 Convert a metadata controller to a client: m In Xsan Admin, select Computers in the SAN Assets list, select the metadata controller in the list, and choose Make Client from the Action pop-up menu (gear). If you can’t choose Make Client, make sure all Xsan clients and metadata controllers are turned on and their status is Ready in Xsan Admin’s Computers list. Step 5: Unmount and stop all volumes Before migrating data from your old metadata controllers to new computers, stop all SAN volumes so they can’t be changed. Unmount and stop al volumes: 1 In Xsan Admin, select Mounts in the SAN Assets list. 2 Choose a volume from the Volume pop-up menu. 3 Select all clients in the list and click the Unmount button. To select more than one client, hold down the Command or Shift key as you select clients in the list. 4 Choose Stop Volume from the Action pop-up menu (gear). 5 Repeat for all volumes in the SAN. Step 6: Connect new Macs to the SAN Connect your new Macs to the SAN’s Ethernet and Fibre Channel networks. If necessary, remove old computers to make ports available. Don’t go through the setup assistant on the new Macs yet. Important: Mac OS X Lion Server is recommended for all SAN controllers and is required if you use Xsan Admin to manage users and groups. Make sure any client you want to convert to a controller has Mac OS X Lion Server. Step 7: Migrate the primary metadata controller Use the server setup assistant to migrate server data from the old primary controller to a new server. Migrate the primary controller to a new server: 1 Use Xsan Admin to make sure the primary metadata controller is in the failover priority list for every SAN volume. 2 Make sure Xsan Admin isn’t open on any computer that can connect to a metadata controller. Xsan Admin can become confused if it’s open when a SAN computer’s IP address migrates to a new computer.Appendix A Upgrade to Xsan 2.3 135 3 Restart the old primary metadata controller in target disk mode, so the server setup assistant can transfer data from it to a new server. You can restart in target disk mode by holding down the T key when the computer starts up. 4 Turn on the new server that you want to become the primary metadata controller, and wait for the server setup assistant’s Welcome pane to appear. 5 Proceed through the server setup assistant to the "Transfer an Existing Mac Server” pane, select “Transfer the information from an existing server,” and click Continue. 6 Connect the old primary metadata controller to the new server with a FireWire cable, and when you’re ready to begin transferring data, click Continue in the Transfer Your Mac Server pane. 7 After the server setup assistant finishes transferring data, proceed through the remaining setup panes. 8 Shut down the old primary metadata controller, and disconnect it from the Ethernet and Fibre Channel networks. Don’t start up the old primary metadata controller while it’s connected to the Ethernet networks, because it has the same IP address as the new server you migrated it to. Step 8: Migrate former standby controllers Use the server setup assistant to migrate server data from the former standby metadata controllers, which you converted to SAN clients in an earlier step, to new servers. You convert the new servers to metadata controllers in the next step. Migrate a former standby controller to a new server: 1 Make sure Xsan Admin isn’t open on any computer that can connect to a metadata controller. Xsan Admin can become confused if it’s open when a SAN computer’s IP address migrates to a new computer. 2 Restart the former standby metadata controller in target disk mode, so the server setup assistant can transfer data from it to a new server. You can restart in target disk mode by holding down the T key when the computer starts up. 3 Turn on the new server that you want to become the primary metadata controller, and wait for the server setup assistant’s Welcome pane to appear. 4 Proceed through the server setup assistant to the "Transfer an Existing Mac Server” pane, select “Transfer the information from an existing server,” and click Continue. 5 Connect the former standby metadata controller to the new server with a FireWire cable, and when you’re ready to begin transferring data, click Continue in the Transfer Your Mac Server pane.136 Appendix A Upgrade to Xsan 2.3 6 After the server setup assistant finishes transferring data, proceed through the remaining setup panes. 7 Shut down the former standby metadata controller, and disconnect it from the Ethernet and Fibre Channel networks. Don’t start up the former standby metadata controller while it’s connected to the Ethernet networks, because it now has the same IP address as the new server you migrated it to. Step 9: Convert clients to standby controllers You converted your old standby metadata controllers to SAN clients in an earlier step, and after migrating them to new servers in the previous step, the new servers are still SAN clients. You need to convert those clients to standby controllers. Convert a client to a standby controller: 1 Open Xsan Admin on the primary controller and select Computers in the SAN Assets list. 2 Select the client, and then choose Make Controller from the Action pop-up menu (gear). Step 10: Migrate or upgrade SAN clients When your SAN controllers all have Mac OS X Lion Server, you can migrate or upgrade the SAN clients.  If you’re replacing client computers in the SAN with new computers, use the Mac OS X Lion setup assistant or the Mac OS X Lion Server setup assistant to migrate data from old client computers to their replacements.  If you’re keeping client computers in the SAN, upgrade them to Mac OS X Lion or Lion Server.  If you aren’t upgrading a client computer, and it has Mac OS X or Mac OS X Server v10.6, upgrade to Xsan 2.2.1 or later.  If a client computer has Mac OS X or Mac OS X Server 10.5 or earlier, you must upgrade it to v10.6 to use it in your Xsan 2.3 SAN.  If you have client computers with PowerPC processors, you can’t use them in your Xsan 2.3 SAN. You can replace them with Macs that have Intel processors and Fibre Channel ports or adapters. Migrate to a new computer: 1 Make sure Xsan Admin isn’t open on any computer that can connect to a metadata controller. Xsan Admin can become confused if it’s open when a SAN computer’s IP address migrates to a new computer. 2 Turn on the new computer, and wait for the setup assistant to appear.Appendix A Upgrade to Xsan 2.3 137 3 Proceed through the setup assistant to the pane that offers to transfer data from an existing computer, and choose to transfer data. Connect the old computer and the new computer with a FIreWire cable, and restart the old computer in target disk mode. You can restart in target disk mode by holding down the T key when the computer starts up. If you aren’t using FireWire to connect the computers, follow the onscreen instructions for connecting them. 4 After the setup assistant finishes transferring data, proceed through the remaining setup panes. 5 Shut down the old computer, and disconnect it from the Ethernet and Fibre Channel networks. The old computer has the same IP address as the new computer you migrated it to. If SAN volumes don’t mount on a client migrated to Mac OS X Lion or Lion Server, use the Xsan pane of System Preferences on the client to make sure Xsan is enabled. Upgrade Mac OS X and Xsan: m Open the Mac App Store on the client computer you want to upgrade, and purchase Mac OS X Lion. After you purchase Mac OS X Lion, the Mac OS X Install Assistant opens. It upgrades Mac OS X v10.6 to Mac OS X Lion, or Mac OS X Server v10.6 to Mac OS X Lion Server. If the client computer you’re upgrading has Mac OS X or Mac OS X Server v10.5, upgrade it to v10.6 before purchasing Mac OS X Lion. After upgrading to v10.6:  Use Software Update to update to the latest version of Mac OS X or Mac OS X Server v10.6  Use Software Update to update to Xsan 2.2.1 or later. You must update Xsan because there are underlying differences between Xsan 2.2 for Mac OS X v10.5 and Xsan 2.2 for Mac OS X v10.6. Upgrading to Mac OS X Lion or Lion Server upgrades Xsan to version 2.3. If SAN volumes don’t mount on a client upgraded to Mac OS X Lion or Lion Server, use the Xsan pane of System Preferences on the client to make sure Xsan is enabled. Upgrade Xsan only: m On a client computer with Mac OS X or Mac OS X Server v10.6, choose Software Update from the Apple menu and update to Xsan 2.2.1 or later. If the client computer has Mac OS X or Mac OS X Server 10.5 or earlier, you must upgrade it to v10.6 in order to use it in your Xsan 2.3 SAN. If Xsan Admin displays a message about “Incorrect Search Policy,” use the Login Options section of the Users & Groups pane of System Preferences (the Accounts pane in Mac OS X v10.6) to connect to the correct network account server (directory server).138 Appendix A Upgrade to Xsan 2.3 Step 11: Enable extended attributes If you have only Macs on your SAN, enable extended attributes on your SAN volumes to improve volume performance and efficiency. Important: Enabling extended attributes can’t be undone. WARNING: To avoid data loss, clients with Quantum’s StorNext File System (Windows, AIX, IRIX, Linux, and Solaris computers) must not access volumes that use extended attributes. Enable extended attributes: 1 Open Xsan Admin and select Volumes in the SAN Assets list. 2 Select the volume and choose Edit Volume Settings from the Action pop-up menu (gear). 3 Click to select “Enable on this volume” next to Extended Attributes. The time it takes to convert the volume to use extended attributes depends on the number of files on the volume—it might take several hours for a large volume. During this time, the volume is mounted only on the converting controller and can’t be used by clients. The volume is mounted on clients and other controllers when the conversion is finished. Step 12: Change filename case sensitivity If all your SAN computers have Mac OS X Lion or Lion Server, you can specify whether a volume ignores capitalization in filenames. For example, a volume can consider myfile, MyFile, and MYFILE to be the same or different filenames. For best performance with volumes that you share using the SMB protocol, make them case insensitive. Change filename case sensitivity for a volume: 1 In Xsan Admin, select Volumes in the SAN Assets list. 2 Select the volume and choose Edit Volume Settings from the Action pop-up menu (gear). 3 Select or deselect the checkbox next to Case Insensitivity and click OK. When you change case sensitivity, Xsan checks all existing filenames to make sure the change won’t result in filenames being considered the same. This check can take a while. If Case Insensitivity is selected, the volume considers filenames to be the same if they’re spelled alike but capitalized differently. If Case Insensitivity is not selected, the volume considers filenames to be different if they’re spelled alike but capitalized differently. Note: After you click OK, the volume is unmounted from all Xsan computers, and then remounted.Appendix A Upgrade to Xsan 2.3 139 Step 13: Reenable Spotlight If you disabled Spotlight to upgrade SAN computers to Mac OS X Lion or Lion Server, reenable it now. Enable Spotlight on a volume: 1 In Xsan Admin, select Volumes in the SAN Assets list. 2 Select the volume and choose Edit Volume Settings from the Action pop-up menu (gear). 3 Click to select “Enable on this volume” next to Spotlight. Step 14: Recreate your MultiSAN configuration If you use the MultiSAN capability of Xsan to host volumes on subsets of available controllers, your volume failover priorities were reset when you converted standby metadata controllers to clients in step 3. You can now adjust failover priorities to recreate your MultiSAN configuration. Specify which controllers host a volume: 1 In Xsan Admin, select Volumes in the SAN Assets list. 2 Select a volume and choose Edit Failover Priority from the Action pop-up menu (gear). 3 Click to select or deselect controllers in the list, and click OK. 4 Repeat for all volumes in the SAN.140 Here’s how to connect Windows, Solaris, UNIX, AIX, IRIX, or Linux clients to an Xsan SAN. Xsan is fully compatible with Quantum’s StorNext File System, so you can set up Mac Pro, Xserve, and RAID systems to act as SAN controllers and storage for Windows, Sun Solaris, UNIX, IBM AIX, SGI IRIX, or Linux clients that run StorNext software. For information about adding Macintosh clients to an existing StorNext SAN, see the StorNext Product Bulletin #42, available at www.quantum.com/ServiceandSupport/ SoftwareandDocumentationDownloads/SupportBulletins/Index.aspx. Compatible software versions For information about versions of Xsan and StorNext controllers and clients that can be used on the same SAN, see “Version compatibility” on page 13. Terminology Note these differences in terminology between StorNext and Xsan: StorNext term Equivalent Xsan term file system volume file system server (FSS) controller (or metadata controller) stripe group storage pool B Appendix Combine Xsan controllers and StorNext clientsAppendix B Combine Xsan controllers and StorNext clients 141 License An Xsan license is included with the purchase of Mac OS X Lion or Lion Server. The Xsan license for a client computer with Mac OS X or Mac OS X Server v10.6 requires a serial number, which can be the single-copy serial number printed on the Xsan Install Disc sleeve included in an Xsan 2.2 package, or it can be a serial number you purchased separately. Licenses for StorNext are included with the purchase of the StorNext software from Quantum. Xsan clients do not use or count as StorNext File System client licenses. Add StorNext clients to an Xsan SAN You can use Quantum’s StorNext software to access an Xsan SAN from a Windows, UNIX, Sun Solaris, IBM AIX, SGI IRIX, or Linux computer. Add a StorNext client to an Xsan SAN: 1 Install the StorNext File System software on the non-Macintosh client following the instructions that Quantum provides in the StorNext package. 2 Connect the non-Macintosh client to the SAN’s Fibre Channel and Ethernet networks. 3 Duplicate the Macintosh Xsan controller’s shared secret file on the non-Macintosh client. The shared secret file is named .auth_secret. On a Macintosh Xsan controller, it’s stored in the folder /Library/Preferences/Xsan/. Copy the file (using the same name) to the non-Macintosh client. On SGI IRIX, Sun Solaris, IBM AIX, and Linux StorNext clients, put the file in /usr/cvfs/config/. On Windows clients, put the file in \%cvfsroot%\config\, where %cvfsroot% is the folder where you installed StorNext. Important: This file contains sensitive information. Secure the file for read/write access by the root user or Windows administrator only. 4 Place a StorNext license file for your non-Macintosh clients on the Macintosh Xsan controller. On the Xsan controller, put the file (named license.dat) in the folder /Library/Preferences/Xsan/. Contact Quantum to obtain a license file for your non-Macintosh clients.142 You can use Xsan shell commands and configuration files to work with a SAN from the command line. You can use the shell commands and configuration files described here to access, set up, and manage Xsan SANs, LUNs, storage pools, and volumes from the command line. The Terminal app is the Mac OS X gateway to the BSD command-line interface (UNIX shell command prompt). Each window in Terminal contains a complete command-line execution context, called a shell, that is separate from all other execution contexts. Although you can use any shell of your choice, the examples in this book assume that you’re using bash, the standard Mac OS X shell. Use shell commands The Xsan command-line utilities are located in /System/Library/Filesystems/acfs.fs/ Contents/bin/. Many commands used to manage Xsan must be executed by the root user (also known as the superuser). If you get a message such as “permission denied,” the command probably requires root user privileges. To execute a single command with root user privileges, begin the command with sudo (short for superuser do). For example: $ sudo cvfsck -n MyVolume If you haven’t used sudo recently, you’re prompted for the password for your administrator account. Send commands to remote computers To use commands on a remote computer, first use SSH to log in to the other computer: $ ssh user@computer Replace user with the name of a user account on the remote computer and computer with its IP address or DNS name. C Appendix Use command-line toolsAppendix C Use command-line tools 143 If you have trouble making an SSH connection, check the Sharing pane of System Preferences on the remote computer and make sure Remote Login service is turned on. View the man pages Detailed documentation for Xsan command-line utilities is available in UNIX-style man pages. A command’s man page includes information about the command, its options, parameters, and proper use. The man pages for Xsan commands are located in /System/Library/Filesystems/acfs.fs/Contents/man/. To view a man page, enter: $ man command Replace command with the command you want information about. Notation conventions These conventions are used throughout the command descriptions: Notation Indicates fixed-width font A command or other text entered in a Terminal window $ A shell prompt [text_in_brackets] An optional parameter (one|other) Alternative parameters (enter one or the other) italicized A parameter you must replace with a value [...] A parameter that can be repeated A displayed value that depends on your SAN configuration Install Xsan from the command line Xsan is installed with Mac OS X Lion and Lion Server. You don’t install Xsan separately on computers with Lion or Lion Server. You can install Xsan on SAN client computers that have Mac OS X or Mac OS X Server version 10.6 Snow Leopard. Install Xsan from the command line: 1 On a SAN client computer that has Mac OS X or Mac OS X Server v10.6, insert the Xsan Install Disc. 2 Open the Terminal app (in the /Applications/Utilities/ folder). 3 Enter one of these commands to install the components:144 Appendix C Use command-line tools  To install the Xsan file system and Xsan Admin app, enter: $ sudo installer -pkg /volumes/Xsan\ Install\ Disc/Install\ Xsan.mpkg -target /  To install only the Xsan Admin app, enter: $ sudo installer -pkg /volumes/Xsan\ Install\ Disc/Install\ XsanAdminApp.pkg/ -target / Install Xsan on a computer that has no keyboard or monitor: 1 Log in to a computer that has a keyboard and monitor, and then insert the Xsan Install Disc. 2 Open the Terminal app (in the /Applications/Utilities/ folder). 3 In Terminal, enter the following command to copy the Xsan installer package to a remote SAN client computer that has Mac OS X or Mac OS X Server v10.6: $ scp -r /Volumes/Xsan\ Install\ Disc/Install\ Xsan.mpkg user@ remotehost:/tmp/ Replace user with the name of an administrator user on the remote computer and remotehost with the IP address or DNS name of the computer you want to install on. To install only the Xsan Admin app, enter: $ scp -r /Volumes/Xsan\ Install\ Disc/Other\ Installs/XsanAdmin.mpkg/ user@remotehost:/tmp/ 4 Log in to the remote computer: $ ssh user@remotehost Replace user and remotehost with the same information as in the previous step. If you have trouble making an SSH connection, check the Sharing pane of System Preferences on the remote computer and make sure Remote Login service is turned on. 5 Run the installer on the headless computer:  To install the Xsan file system and Xsan Admin app, enter: $ sudo installer -pkg /tmp/Install\ Xsan.mpkg -target /  To install only the Xsan Admin app, enter: $ sudo installer -pkg /tmp/Install\ Xsan.mpkg/Contents/Installers/ XsanAdminApp.pkg/ -target /  To monitor the installation, add the -verbose parameter: $ sudo installer -verbose -pkg /tmp/Install\ Xsan.mpkg -target /Appendix C Use command-line tools 145 Xsan commands Xsan includes these command-line tools: Tool Description cvadmin View or change volume and storage pool settings; see page 145 cvaffinity Manipulate affinity tags manually; see page 149 cvcp Copy files or folders; see page 149 cvfsck Check or repair a volume; see page 150 cvlabel View, label, and initialize LUNs; see page 151 cvmkdir Create a folder and assign an affinity; see page 152 cvmkfile Create and preallocate a file; see page 153 cvmkfs Initialize a volume; see page 153 cvupdatefs Apply volume setup changes; see page 154 snfsdefrag Defragment a volume; see page 154 xsanctl Mount and unmount Xsan volumes; see page 156 View or change volume and storage pool settings (cvadmin) Use the cvadmin tool to perform status and setup tasks related to Xsan volumes. For help, see the cvadmin man page or enter: $ sudo cvadmin -e help Enter interactive mode: $ sudo cvadmin Execute commands from a file: $ sudo cvadmin [-H host] [-F volume] -f cmdfile Execute a single command and return to the shell prompt: $ sudo cvadmin [-H host] [-F volume] -e ["]command [cmdparam..."]146 Appendix C Use command-line tools Parameter Description -H host The metadata controller that is hosting the volume. If not provided, the local computer is assumed. host – the IP address or DNS name of a metadata controller other than the one you’re logged in on. -F volume The volume to be the active (“selected”) volume in cvadmin. volume – the name of an Xsan volume -f cmdfile Read commands from the specified file. cmdfile – the name of a text file containing cvadmin commands -e command Execute the specified command and return to the shell prompt. Otherwise, cvadmin continues to run in interactive mode with the prompt Xsanadmin>. If you include parameters (cmdparam) with the command, enclose the command and its parameters in a pair of quotes. Available commands are listed in “cvadmin commands” below. cmdparam Values required by the command. cvadmin commands Commands available in the cvadmin tool are listed in the following table. cvadmin command Description activate [volume|index] Choose the active volume that you want to work with interactively. volume – the name of the volume index – the numeric ID of the volume (to see a list of these, use the cvadmin select command without any parameters) disks [refresh] List LUNs. down pool Disallow all access to a storage pool. pool – the name of a storage pool in the currently active volumeAppendix C Use command-line tools 147 cvadmin command Description fail (volume|index) Cause a volume to fail over to a standby controller. volume – the name of the volume index – the numeric ID of the volume (to see a list of these, use the cvadmin select command without any parameters) filelocks [yes|no] Enable or disable file and record locks. Use the command without any parameter to see the current setting for locks. multipath pool (rotate|static) Specify how Xsan uses multiple paths to a storage pool. pool – the name of a storage pool in the active volume paths List available LUNs. quit Exit from cvadmin. quotas [yes|no] Enable or disable quotas for the active (selected) volume. Use the command without parameters to see the current setting for quotas. quotas get (user|group) name Display current quota information for a user or group. name – the name of the user or group quotas set (user|group) name hard soft grace Set quotas for user or group name. name – the name of the user or group hard – hard quota (bytes) soft – soft quota (bytes) grace – grace period (minutes) quotacheck Recalculate quota information for the active volume.148 Appendix C Use command-line tools cvadmin command Description repquota Generate the following quota report files in / Library/Logs/Xsan/data/volume: quota_report.txt – text file quota_report.csv – comma-delimited file quota_regen.in – cvadmin commands that will set up identical quotas on another metadata controller. You can use cvadmin -f to execute the commands. repof Create a report of open files on the active volume in the file /Library/Logs/Xsan/data/volume/ open_file_report.txt. select [volume] Choose the active volume that you want to work with. The name of the active volume appears preceding the command prompt in interactive mode, for example: Xsanadmin (Vol1) > To see a list of running volumes, leave off the volume parameter. volume – the name of an Xsan volume show [pool] [long] List storage pool information for the active volume. pool – the name of a storage pool in the currently active volume start volume [on] [controller] Start a volume based on the information in its configuration file (/Library/Preferences/Xsan/ volume.cfg). volume – the name of an Xsan volume controller – The address of the metadata controller to start the volume’s FSM process on stat Display information about the active volume. stop volume Stop a volume and its FSM process on all metadata controllers. up pool Allow access to the specified storage pool. pool – the name of a storage pool in the currently active volume who Display client information for the active volume.Appendix C Use command-line tools 149 Manipulate affinity tags (cvaffinity) Use the cvaffinity command to assign an affinity tag to a folder or a file or to list the affinity tag assigned to a folder or a file. Assigning an affinity tag to a folder or file causes it to be stored on a storage pool that has the same affinity tag. You can see the affinity tags for available storage pools by using the show long command of the cvadmin tool. Set an affinity tag for a folder or file: $ cvaffinity -s affinity target List the affinity tag assigned to a folder or file: $ cvaffinity -l target Delete the affinity tag from a folder or file: $ cvaffinity -d target Parameter Description affinity The affinity tag that’s assigned to the storage pools where you want the target folder or file to be stored. target The path to and name of the folder or file. Copy files or folders (cvcp) Use the cvcp command to copy files or folders to or from an Xsan volume. $ cvcp [options] source destination Parameter Description options See “cvcp command options” below. source The file or folder (directory) to be copied. destination Where the copy is created. cvcp command options Option Description -A Turn off preallocation. -b buffers Set the number of I/O buffers to use. buffers – the number of buffers to use for the copy -k size Set the copy buffer size. size – the buffer size (bytes)150 Appendix C Use command-line tools Option Description -l Copy the targets of symbolic links, not the links. -n Do not apply the command to subfolders. -p prefix Only copy files with names that start with the specified prefix. prefix – characters to match with the beginning of the file name -s Allocate on storage pool block boundaries. -t Specify the number of copy threads. -v Report all information about the file copied. -x Retain original file permissions in the copy. -y Retain ownership and group information in the copy. This works only if the root user is performing the copy. -z Retain original modification times in the copy. Examples Copy the file friday to /datasets/data1/july/: $ cvcp friday /datasets/data1/july Copy the folder /data1/ and all subfolders to /datasets/data1/, retaining all permissions and ownerships and displaying files as they are copied: $ cvcp -vxy data1 /datasets/data1 Perform a similar copy as above, but only copy files with names that begin “jul”: $ cvcp -vxy -p jul data1 /datasets/data1/july Check or repair a volume (cvfsck) Use the cvfsck command to check or repair an Xsan volume. $ sudo cvfsck [options] volume Parameter Description options See “cvfsck command options” below. volume The name of the volume to check or repair.Appendix C Use command-line tools 151 cvfsck command options Option Description -d Display extra debugging information. -e Display file extents statistics. -f Report fragmentation. -g Print journal recovery log. -j Perform journal recovery. -J Display raw journal data. -K Reset journal. Warning: Resetting the journal might introduce metadata inconsistencies. Don’t use unless absolutely necessary. -l Record problems in the system log. -n Check volume in read-only mode. -r Relocate files before changing volume configuration. -v Display all available information. –w Modify the file system as needed to repair problems. -x Report statistics in comma-separated form for use in a spreadsheet. Label, list, and unlabel LUNs (cvlabel) Use the cvlabel command to initialize LUNs so they can be added to storage pools. For details, see the cvlabel man page. List available LUNs: $ sudo cvlabel -l [-s] [-v] Note: This command lists all disks, not just the available LUNs. List current LUN and label information you can paste into a label file: $ sudo cvlabel -c Note: This command lists all disks, not just the available LUNs.152 Appendix C Use command-line tools Label a LUN: $ sudo cvlabel [-v] [-f] [labelfile] Important: Be sure to use this command only on disks that aren’t being used. Using Xsan Admin to label LUNs is safer, because it only shows available LUNs. Remove the label from a LUN: $ sudo cvlabel -u lun Parameter Description -l List available LUNs. -s Display device serial numbers. -v Show progress display. -c Create a label template file. -f Relabels LUNs that are labeled. labelfile An optional file containing information for each label. You can use the -c option to create this file. lun The LUN identified by disk name—for example: /dev/disk4. -u Unlabel the specified LUN. Create a folder and assign an affinity (cvmkdir) Use the cvmkdir command to create a folder (directory) and assign it an affinity tag so that its contents are stored on storage pools with the same affinity tag. $ cvmkdir -k affinity folder Parameter Description -k affinity Specifies the affinity tag to be associated with the folder. affinity – the affinity tag that’s assigned to the storage pools where you want the folder’s contents to be stored You can use the show long command of the cvadmin tool to see a storage pool’s affinity tag. You can use -k "" to remove the folder’s affinity tag. folder The path to and name of the folder.Appendix C Use command-line tools 153 Create and preallocate a file (cvmkfile) Use the cvmkfile command to allocate space for a file on an Xsan volume. $ cvmkfile [-k affinity] [-p] [-s] [-w] [-z] size(k|m|g) filename Parameter Description -k affinity Allocate space for the file on one of the storage pools with the specified affinity tag. affinity – the affinity tag that’s assigned to the storage pools where you want the folder’s contents to be stored You can use the show long command of the cvadmin tool to see a storage pool’s affinity tag. -p Force future extensions of the file to be aligned on block boundaries. -s Force the file allocation to align with block boundaries. -w Set file size as indicated by size. -z Set the contents of the file to zeros. size(k|m|g) A number specifying the amount of space to allocate to the file. size – a number k – kilobytes m – megabytes g – gigabytes filename The path to and name of the file to allocate. Example Allocate 2 GB of space for the file “data1” on the storage pool “datasets”: $ cvmkfile -k datasets 2g data1 Initialize a volume (cvmkfs) Use the cvmkfs command to initialize an Xsan volume based on the information in the volume’s configuration (in /Library/Preferences/Xsan/volume.cfg). WARNING: Initializing a volume destroys all existing data on the volume. $ sudo cvmkfs [-G] [-F] [volume]154 Appendix C Use command-line tools Parameter Description -G Don’t display “Press return to continue” prompts. -F Don’t display warning and verification prompts. Use with caution. volume The name of the volume to initialize. This name matches the name of a configuration (.cfg) file in /Library/Preferences/Xsan/. Apply volume configuration changes (cvupdatefs) Use the cvupdatefs command to apply configuration file changes to a volume after you modify the volume’s configuration files. $ sudo cvupdatefs [-f] volume [configdir] Parameter Description -f Update without prompting for confirmation or advising of errors in the configuration file. volume The volume to update. If you don’t specify a volume, available volumes are listed for you to choose from. configdir Location of the volume’s configuration (.cfg) file if it’s not in the default location (/Library/ Preferences/Xsan/). Defragment a file, folder, or volume (snfsdefrag) Use the snfsdefrag command to defragment a file by reallocating its data in a single extent. This can improve read and write performance for a file by increasing disk efficiency and reducing file metadata management overhead. Defragment a file or folder: $ snfsdefrag [-D] [-d] [-q] [-s] [-v] [-K affinity] [-k affinity] [-m count] [-r] target Report file extents without defragmenting: $ snfsdefrag -e [-K affinity] [-r] target [target] [...] Display an extent count without defragmenting: $ snfsdefrag -c [-K affinity] [-r] target [target] [...] Prune a file (remove allocated extents beyond the end of file): $ snfsdefrag -p [-D] [-v] [-q] [-K affinity] [-m count] [-r] target [target] [...] List files that are candidates for defragmentation: $ snfsdefrag -l [-D] [-v] [-K affinity] [-m count] [-r] target [target] [...]Appendix C Use command-line tools 155 Parameter Description -c Display an extent count but don’t defragment target. -D Display debugging messages. -d Operate on files with other than the current depth. -e Report extents without defragmenting. -K affinity Only operate on files with the specified storage pool affinity. affinity – the affinity key (in Xsan, the affinity key is the same as the name of the storage pool) You can use the cvadmin show long command to see a storage pool’s affinity key. -k affinity Allocate new extents on the storage pool with this affinity. -l List files that might benefit from defragmentation. -m count Only operate on files with more than count extents. -p Prune instead of defragment. -q Suppress messages. -r [target] Operate recursively to defragment all files in all folders within the specified target folder. -s Allocate new extents on block boundaries. -v Display all available information and status during defragmentation. Examples Count the extents in the file datafile: $ snfsdefrag -c datafile List the extents: $ snfsdefrag -e datafile Defragment the file datafile: $ snfsdefrag datafile Defragment every file in the folder /datafolder/ (or any folder within /datafolder/) that has more than one extent: $ snfsdefrag -r datafolder Recover unused preallocated disk space assigned to every file in folder /datafolder/: $ snfsdefrag -rp datafolder156 Appendix C Use command-line tools Control the Xsan file system (xsanctl) Use the xsanctl command to control basic Xsan file system functions. For details, see the xsanctl man page. $ sudo xsanctl command xsanctl commands xsanctl command Description ping Sends a ping message to the Xsan file system to verify that it’s responding to management requests. mount volume [options] Mounts an Xsan volume on the computer. If successfully mounted, the volume will be automounted at startup. volume – the name of the volume options – a space-delimited list of options for the mount operation. Automatic remounts of this volume also use the given mount options. If no options are given, the options used for the last mount operation are used. Valid mount options are most of the mount options recognized by the mount_acfs command. The few mount_acfs mount options that don’t apply to Xsan are ignored. Options are given by name and prefaced by two dashes (--). For example, to disable atime updates, use the noatime option of mount_acfs like this: xsanctl mount --noatime For options that pass a parameter, the option name is followed by an equals sign (=) and then the option. For example, to specify that the kernel should create 12 threads for the mount point, use: xsanctl mount --threads=12 If you use the --at option, make sure it specifies a location in the root file system. Xsan volumes mounted atop other file systems may not automatically remount correctly. For more information about available options, see the mount_acfs man page. unmount volume Unmounts an Xsan volume on the computer. If successfully unmounted, the volume won’t be automounted at startup. volume – the name of the volumeAppendix C Use command-line tools 157 xsanctl command Description list Lists the volumes available on the SAN and the path at which each volume is mounted on the local computer. sanConfigChanged Notifies the Xsan file system that it should reload the SAN configuration. roleChanged Notifies the Xsan file system that this computer’s SAN role has changed or the computer was removed from the SAN. disksChanged Notifies the Xsan file system that it should rescan disks. wipeConfig Resets the Xsan file configuration to an unconfigured state. All files in /Library/ Preferences/Xsan/ are removed except uuid. The xsand process isn’t unloaded. Directory services aren’t reconfigured. Mount an Xsan volume Use the xsanctl command to mount an Xsan volume on a computer. Mount a volume from the command line: 1 Go to the computer and open Terminal, or use SSH to log in to the computer remotely: $ ssh user@computer Replace user with the name of a user account on the remote computer and computer with its IP address or DNS name. If you have trouble making an SSH connection, check the Sharing pane of System Preferences on the remote computer and make sure Remote Login service is turned on. 2 Mount the volume: $ sudo xsanctl mount volume For example: $ sudo xsanctl mount SanVol Unmount an Xsan volume Use the xsanctl command to unmount an Xsan volume on a computer. Unmount a volume: 1 Go to the computer and open Terminal, or use SSH to log in to the computer remotely: $ ssh user@computer Replace user with the name of a user account on the remote computer and computer with its IP address or DNS name.158 Appendix C Use command-line tools If you have trouble making an SSH connection, check the Sharing pane of System Preferences on the remote computer and make sure Remote Login service is turned on. 2 Unmount the volume: $ sudo xsanctl unmount volume For example: $ sudo xsanctl unmount SanVol View logs The system log to which Xsan writes information about SANs is in /var/log/system.log. Volume logs are in /Library/Logs/Xsan/data/volume/log/cvlog, where volume is the name of the specific volume. Xsan configuration files Xsan stores its configuration information in the following files. On Xsan metadata controllers and Xsan 2.3 clients (Macs with Mac OS X Lion or Lion Server), the configuration files are located at /Library/Preferences/Xsan/. Some of the following Xsan configuration files are present on Xsan 2.2 clients at /Library/Filesystems/Xsan/config/. Note: Don’t edit these files except under the direction of an Apple support engineer. File or folder in /Library/Preferences/Xsan/ Contents volume.cfg Volume settings volume-auxdata.plist Additional volume settings used by Xsan Admin fsmlist Volume autostart list fsnameservers Controller list automount.plist Xsan volumes to be mounted during startup, and their mount options config.plist Private Xsan Admin configuration information notifications.plist Notification settings made with Xsan Admin notes/ Note files whose contents were entered in Xsan Admin’s Inspector window uuid Private Xsan Admin computer identification information license.dat StorNext license information159 affinity A relationship between a folder on an Xsan volume and one or more storage pools that provide storage for the volume. The affinity guarantees that files placed in the folder are stored only on the associated storage pools. Storage pools can differ in capacity and performance, and affinities can be used to assure that data such as video, which requires high transfer speed, is stored on the fastest storage devices. affinity tag In Xsan predefined volume types, you assign LUNs to affinity tags instead of assigning the LUNs directly to storage pools. Then Xsan Admin can create underlying storage pools with appropriate affinities and the optimal numbers of LUNs to achieve best performance. allocation strategy In Xsan, the order in which data is written to the storage pools that make up a volume. Applicable only if there’s more than one storage pool in a volume, and only if the pools are of the same class. Can be fill, round robin, or balance. balance An Xsan storage pool allocation strategy. Before allocating space on a volume consisting of more than one storage pool, Xsan checks available storage on all pools, and then uses the one with the most free space. block allocation size An Xsan volume property. The smallest number of bytes that can be reserved on, written to, or read from an Xsan volume. client A computer (or a user of the computer) that requests data or services from another computer, or server. controller In an Xsan storage area network, short for metadata controller. In RAID systems, controller refers to hardware that manages the reading and writing of data. By segmenting and writing or reading data on multiple drives simultaneously, the RAID controller achieves fast and highly efficient storage and access. See also metadata controller. failover In Xsan, the automatic process by which a standby metadata controller becomes the active metadata controller if the primary controller fails. failover priority On a SAN with more than one controller, specifies which standby controller to try first during failover. file system A scheme for storing data on storage devices that allows apps to read and write files without having to deal with lower-level details. Glossary Glossary160 Glossary file system server See FSS. fill An Xsan storage pool allocation strategy. In a volume consisting of more than one storage pool, Xsan fills up the first pool before writing to the next. format (verb) In general, to prepare a disk for use by a particular file system. FSS File system server. The StorNext File System term for the computer that manages metadata in a storage area network (SAN). In Xsan, this is called a metadata controller. initialize To prepare a disk for use by a particular file system. In Xsan, to prepare a RAID array for use in a storage pool. label (noun) In Xsan, an identifying name for a LUN. You can assign a label to a LUN before or during setup of an Xsan storage pool. label (verb) Used by some sources (such as StorNext) to refer to the process of preparing a logical disk for use with a file system. In Xsan, however, initialize is used to refer to preparing a disk for use in a storage pool. logical disk A storage device that appears to a user as a single disk for storing files, even though it might actually consist of more than one physical disk drive. An Xsan volume, for example, is a logical disk that behaves like a single disk even though it consists of multiple storage pools that are, in turn, made up of multiple LUNs, each of which contains multiple disk drives. See also physical disk. LUN Logical unit number. A SCSI identifier for a logical storage device. In Xsan, an unformatted logical storage device such as a RAID array or slice. metadata Information about a file system and the files it stores (for example, which disk blocks a file occupies or which blocks are available for use). In Xsan, metadata is managed by a metadata controller and exchanged over an Ethernet connection, while actual file data is transferred over a Fibre Channel connection. metadata controller The computer that manages metadata in an Xsan storage area network. mount (verb) To make a remote directory or volume available for access on a local system. In Xsan, to cause an Xsan volume to appear on a client’s desktop, just like a local disk. physical disk An actual, mechanical disk. Compare with logical disk. RAID Redundant Array of Independent (or Inexpensive) Disks. A grouping of multiple physical hard disks into a disk array, which either provides high-speed access to stored data, mirrors the data so that it can be rebuilt in case of disk failure, or both. The RAID array is presented to the storage system as a single logical storage unit. See also RAID array, RAID level. RAID 0 A RAID scheme in which data is distributed evenly in stripes across an array of drives. RAID 0 increases the speed of data transfer, but provides no data protection.Glossary 161 RAID 0+1 A combination of RAID 0 and RAID 1. This RAID scheme is created by striping data across multiple pairs of mirrored drives. RAID 1 A RAID scheme that creates a pair of mirrored drives with identical copies of the same data. It provides a high level of data availability. RAID 3 A RAID scheme that stripes data across two or more drives and stores parity data on a dedicated drive. In the event of a disk failure, the redundant parity bits can be used to reconstruct data on any drive. RAID 5 A RAID scheme that distributes both data and parity information across an array of drives one block at a time, with each drive operating independently. This enables maximum read performance when accessing large files. RAID array A group of physical disks organized and protected by a RAID scheme and presented by RAID hardware or software as a single logical disk. In Xsan, RAID arrays appear as LUNs, which are combined to form storage pools. RAID level A storage allocation scheme used for storing data on a RAID array. Specified by a number, as in RAID 3 or RAID 0+1. RAID set See RAID array. round robin An Xsan storage pool allocation strategy. In a volume consisting of more than one storage pool, Xsan allocates space for successive writes to each available pool in turn. SAN Storage area network. In general, a network whose primary purpose is the transfer of data between computer systems and storage elements and among storage elements. In Xsan, a SAN is a combination or one or more controllers, storage volumes, and storage clients. storage pool A group of logical disks that share common characteristics, such as throughput or latency, across which user data is striped. In Xsan, storage pools are combined into volumes. The StorNext File System calls this a stripe group. stripe (verb) To write data to successive stripes in a RAID array or LUN. stripe breadth An Xsan storage pool property. The number of bytes of data, expressed as a number of file system blocks, that Xsan writes to a LUN in a storage pool before moving to the next LUN in the pool. stripe group The StorNext File System term for an Xsan storage pool. volume A mountable allocation of storage that behaves, from the client’s perspective, like a local hard disk, hard disk partition, or network volume. In Xsan, a volume consists of one or more storage pools. See also logical disk.A access permissions for folders 97 unmounting a volume 98 access control list. See ACLs ACLs enabling and disabling 82 setting up in Xsan Admin 97 Active Directory 58, 61 adding clients to SAN 89 adding storage 38, 71 affinity assigning to folder 77 described 35, 36 removing 79 affinity tag 35 allocation strategy setting for volume 80 availability considerations 47 B balance volume allocation strategy 80 block allocation size choosing for a volume 80 C case sensitivity 66, 82, 90 client worker threads 93 clients adding 89 adding serial number 91 checking quotas from 104 defined 33 moving 91 removing from SAN 99 StorNext 141 using a volume 121 command-line tools cvadmin 145 cvaffinity 149 cvcp 149 cvfsck 150 cvlabel 151 cvmkdir 152 cvmkfile 153 cvmkfs 153 cvupdatefs 154 installed location 142 man pages 143 snfsdefrag 154 xsanctl 156 compatibility with other versions of Xsan 13 configuration files 158 controllers adding 107 changing IP address 111 limit per SAN 38 listing hosted volumes 110 overview 33 cvadmin tool 145 cvaffinity tool 149 cvcp tool 149 cvfsck tool 150 checking volumes 85, 86 repairing volumes 87 cvlabel tool 151 cvmkdir tool 152 cvmkfile tool 153 cvmkfs tool 153 cvupdatefs tool 154 D defragmenting volumes 85 delay access time updates 93 directory cache size 93 directory services 43, 57, 61 Directory Utility 62 E email notifications 119 enabling Xsan 63 Ethernet configuring 59 guidelines 42 Index 162 IndexIndex 163 exclusive affinity tag 84 expanding storage 38, 71 extended attributes enabling 81 F failover 109 forcing 109 failover priority 109 Fibre Channel configuration requirements 41 monitoring connection failures 120 supported switches 41 file systems. See volumes files limit per volume 38 maximum size 38 name length limit 38 fill volume allocation strategy 80 firewall, and Xsan Admin 58 fragmentation 85 free space checking quota use 103 checking storage pool 117 checking volume 117 G grace period (quota) 102 graphs controller overall CPU use 118 controller overall IP network use 118 group ID. See GID groups configuring 61 setting up 57 H hard quota checking 103 defined 102 setting 100 home folders creating local 44, 96 I IP addresses changing for controller 111 J journal choosing location 50 described 37 L logical unit number. See LUNs logs controlling number of messages 58 viewing 120 LUNs (logical unit numbers) actual size vs. used size 76, 123 adding to existing affinity tag 75 description 34 limit per storage pool 38 limit per volume 38 maximum size 38 name length limit 38 overview 33 preparing 56, 72 setup scripts 72 size adjusted downward 123, 125 trouble adding to storage pool 125 M mail service for notifications 44 man pages for command-line tools 143 memory requirements 40 metadata choosing location 50 described 37 estimating space requirement 51 mount options 93 mounting a volume 92 from the command line 157 moving clients to another SAN 91 N naming limits 38 networks in SAN overview 32, 33 notation conventions for commands 143 notifications mail service required 44 setting up 68, 119 O Open Directory 57, 61 P permissions user access to folders 97 Q quotas checking from client 104164 Index checking from command line 104 checking usage in Xsan Admin 103 described 102 example 103 grace period 102 setting 68, 100 R RAID schemes for LUNs 47 refresh interval, Xsan Admin 58 repairing a volume 87 round robin volume allocation strategy 80 S SAN (storage area network) adding 69 adding clients 89 adding storage 71 destroying 70 managing multiple 69 moving clients 91 name length limit 38 renaming 69 security considerations 38, 47 serial number adding 91 server setup assistant 57 shared secret file 141 shell commands. See command-line tools. snfsdefrag tool 154 defragmenting files 86 soft quota checking 103 defined 102 setting 100 Spotlight enabling and disabling 66, 81 storage area network. See SAN storage pools adding to existing volume 74 advanced settings 83 checking free space 117 described 35 limit per volume 38 name length limit 38 reserved names 124 storage, expanding 71 StorNext File System 140 stripe breadth 84 stripe groups. See storage pools striping, across LUNs 35, 37 system requirements 40 T text message notifications 119 time server 60 tools. See command-line tools. troubleshooting can’t access RAID system 123 can’t connect to SAN 122 can’t enable Xsan 122 can’t mount volume 123 can’t unmount volume 123 client unable to reconnect 124 computers not listed 122 file copy doesn't finish 125 LUN size adjusted downward 123, 125 poor Fibre Channel performance 124 reserved storage pool names 124 unable to add LUN 125 unable to rename volume 123 volume restarts 126 U unmounting a volume 98 from the command line 157 users configuring 61 finding 58 home folders 57 setting up 57 V volume configuration file 158 volumes adding to existing SAN 73 checking free space 117 checking integrity 86 configuration file 158 defragmenting 85 described 36 destroying 88 fragmentation 85 identifying controller 110 listed by controller 110 mounting from command line 157 name length limit 38 repairing 87 show clients using 121 trouble mounting 123 unmounting 98, 157 X Xsan Admin installing 68 remote SAN management 69 Xsan Admin application and firewalls 58Index 165 overview 58 preferences 58 refresh interval 58 Xsan software disabling 99 version compatibility 13 Xsan enabling 63 xsanctl tool 156 Let’s get started When you start your MacBook Pro for the first time, Setup Assistant will help you get going. Just follow a few simple steps to quickly connect to your Wi-Fi network, transfer your stuff from another Mac or a PC, and create a user account for your Mac. You’ll also be able to log in with your Apple ID. This will allow you to shop the App Store, iTunes Store, and Apple Online Store. It will let you keep in touch using Messages and FaceTime. And it will let you access iCloud, which is automatically set up on your Mac in apps like Mail, Contacts, and Calendar. If you don’t have an Apple ID, you can create one in Setup Assistant. Multi-Touch gestures You can do a lot of things on your MacBook Pro using simple gestures on the trackpad. Here are some of the most popular ones. Get to know your desktop The desktop is where you can find everything and do anything on your Mac. The Dock at the bottom of the screen is a handy place to keep the apps you use most. It’s also where you can open System Preferences, which lets you customize your desktop and other settings on your Mac. Click the Finder icon to quickly get to all your files and folders. The menu bar at the top has lots of useful information about your Mac. To check the status of your wireless Internet connection, click the Wi-Fi icon. Your Mac automatically connects to the network you chose during setup. Hello. Multi-Touch trackpad MagSafe 2 power connector Power adapter AC power cord Power button Click Press down anywhere on the trackpad to click. Or, with Tap to Click enabled, simply tap the surface. Secondary click (right click) Click with two fingers to open shortcut menus. Or, with Tap to Click enabled, tap two fingers anywhere. Swipe to navigate Swipe with two fingers to flip through web pages, documents, and more. Double click Press down two times anywhere on the trackpad. Or, with Tap to Click enabled, double-tap the surface. Two-finger scroll Brush two fingers along the trackpad to scroll in any direction—up, down, or sideways. Smart zoom Double-tap the trackpad with two fingers to quickly magnify a web page. Pinch to zoom Zoom in and out of photos and web pages more precisely by pinching your thumb and finger. Switch between full-screen apps Swipe with three fingers to move from one full-screen app to another. View Launchpad Pinch with four fingers to view all your apps in Launchpad. Rotate Turn your thumb and finger clockwise or counterclockwise to rotate an image. View Mission Control Swipe up with three fingers to see every open window on your Mac. Learn more Choose System Preferences from the Apple menu and click Trackpad to learn more about gestures. iCloud iCloud stores your music, photos, documents, calendars, and more. And it wirelessly pushes them to your Mac, iPhone, iPad, iPod touch, and even your PC. All without docking or syncing. So when you buy a song on one device, it’s instantly available on all your other devices. When you adjust your calendar, all your devices stay up to date. And with Photo Stream, your latest photos appear everywhere you want to see them, automatically. To customize your iCloud settings, open the Apple menu, choose System Preferences, and click iCloud. Then sign in with your Apple ID and choose the iCloud features you want to use. An important note Please read this document and the safety information in the Important Product Information Guide carefully before you first use your computer. Learn more You can find more information, watch demos, and learn even more about MacBook Pro features at www.apple.com/macbookpro. Help You can often find answers to your questions, as well as instructions and troubleshooting information, in Help Center. Click the Finder icon, click Help in the menu bar, and choose Help Center. OS X Utilities If you have a problem with your Mac, OS X Utilities can help you repair your computer’s flash storage, restore your software and data from a Time Machine backup, or erase your flash storage and reinstall OS X and Apple applications. You can also use Safari to get online help. If your Mac detects a problem, it opens OS X Utilities automatically. Or you can open it manually by restarting your computer while holding down the Command and R keys. Support Your MacBook Pro comes with 90 days of technical support and one year of hardware repair warranty coverage at an Apple Retail Store or an Apple Authorized Service Provider. Visit www.apple.com/support/macbookpro for MacBook Pro technical support. Or call 1-800-275-2273. In Canada, call 1-800-263-3394. Not all features are available in all areas. TM and © 2012 Apple Inc. All rights reserved. Designed by Apple in California. Printed in XXXX. 034-6357-A AC plug Help menu Menu bar Finder Dock System Preferences Quick Start Guide Let’s get moving It’s easy to move files like documents, email, photos, music, and movies to your new Mac from another Mac or a PC. The first time you start your new Mac, it will walk you through the process step by step. All you have to do is follow the onscreen instructions. Welcome to your new MacBook Pro. We’d like to show you around. MagSafe 2 USB 3 Headphone FaceTime HD camera SDXC HDMI USB 3 Wi-Fi status Thunderbolt Dual microphonesClick the Safari icon in the Dock and surf the web quickly and easily with Multi-Touch gestures. Scroll up or down with two fingers on the trackpad. Swipe right and left with two fingers to go back and forth Safari web browser Mail Top Sites Get a quick overview of the sites you visit most often. One-stop email View all your accounts in Mail for one-click access. Conversation view See all the email messages from a conversation thread. Search Quickly narrow search results to find exactly what you want. Mail lets you manage all your email accounts from a single, ad-free inbox, even when you’re not connected to the Internet. It works with most email standards— including POP3 and IMAP—and between pages. Double-tap with two fingers to magnify a page, then double-tap again to return to the original size. Or pinch to zoom in and out. popular email services like Gmail, Yahoo! Mail, and AOL Mail. You can also use Mail for the free me.com email account you get with iCloud. The first time you open Mail, Setup Assistant will help you get started. Launchpad Open Launchpad Click the Launchpad icon in the Dock. Folders Group apps in folders by dragging one app on top of another. Launchpad is the home for all the apps on your Mac. Just click the Launchpad icon in the Dock, and your open windows are replaced by a full-screen display of all your apps. Arrange apps any way you want, group them together in folders, or delete them from your Mac. When you download an app from the Mac App Store, it automatically appears in Launchpad. Mission Control Mission Control gives you a bird’s-eye view of everything running on your Mac. Click the Mission Control icon in the Dock, and your desktop zooms out to display all the open windows in every application, all your fullscreen apps, and Dashboard, the home of mini-apps called widgets. Click anything to zoom in on it. Think of Mission Control as the hub of your system—view everything and go anywhere with just a click. Open Mission Control Click the Mission Control icon in the Dock. Add desktop spaces Click the + button to the right of the top row to add a new space. Dashboard Located at the top left for easy access. Reading List Click the glasses icon to save pages to read later. Mac App Store The Mac App Store is the best way to find and download thousands of apps for your Mac, from games and social networking to productivity apps and more. New apps install in one step to Launchpad. You can install apps on every Mac authorized for your personal use and even download them again. The Mac App Store lets you know when app and OS X updates are available, so you always have the latest versions. Open the Mac App Store by clicking its icon in the Dock. iTunes With iTunes, you can organize and play your digital music and videos on your Mac. And you can shop in the iTunes Store for new music, movies, TV shows, books, and more. iTunes is also where you’ll find the App Store for iPad, iPhone, and iPod touch. iTunes Store Discover and buy new music, movies, and more. Genius Mixes Let iTunes search your music library and group songs that go great together. Calendar Multiple calendars Access all your calendars from one place. Keep track of your busy schedule with Calendar. You can create separate calendars—one for home, another for school, a third for work. See all your calendars in a single window or choose to see only the calendars you want. Create and send invitations using contact info from the Contacts app, then see who has responded. Use iCloud to update calendars on all your devices automatically or share calendars with other iCloud users. iPhoto Create Create books, cards, and calendars. Faces iPhoto can even organize your photos based on who’s in them. Events Double-click any Event to browse photos. iPhoto is the best way to organize, browse, edit, and share your photos on your Mac. You can organize your photo library by Faces, Places, and Events. To send photos by email or publish them to Facebook, just select the photo and click Share in the bottom right of your screen. Or click Create to turn your favorite shots into photo books, calendars, and cards. iMovie Event browser Your imported videos appear here so you can access all your clips. Project browser Simply drop your clips in a project to create a great movie. iMovie puts all your video clips in one place and gives you the editing tools and special effects you need to quickly turn them into something memorable. You can make great-looking movies or even Hollywood-style movie trailers with just a few clicks. And iMovie lets you import video from most popular digital video cameras, your iPhone, iPad, or iPod touch, or the FaceTime HD camera on your Mac. Messages Just log in with your Apple ID, and you can send unlimited messages including text, photos, videos, and more to your friends on a Mac, iPad, iPhone, or iPod touch. With iCloud, you can start a conversation on one device and pick it up on another. And if you want to talk to someone face to face, you can start a video call* just by clicking the FaceTime icon in the top-right corner of the Messages window. Replies in progress Three dots mean your friend is typing a reply. Delivery receipts See when your message has arrived. FaceTime Start a video call right in Messages. *Requires FaceTime-enabled device for both caller and recipient. Not available in all areas. Full-screen view Click the full-screen button to go full screen. Always up to date Updates to your purchased apps and OS X appear automatically. Discover new apps Browse thousands of apps and download them straight to Launchpad. Calendar view Select the view you prefer—day, week, month, or year. Add an event Double-click in a calendar to create a new event. Cocoa Drawing GuideContents Introduction to Cocoa Drawing Guide 10 At a Glance 10 See Also 11 Overview of Cocoa Drawing 12 Cocoa Drawing Support 12 The Painter’s Model 13 The Drawing Environment 14 The Graphics Context 14 The Graphics State 15 The Coordinate System 16 Transforms 16 Color and Color Spaces 17 Basic Drawing Elements 17 Geometry Support 17 Shape Primitives 18 Images 19 Gradients 20 Text 20 Views and Drawing 21 Common Drawing Tasks 22 Graphics Contexts 24 Graphics Context Basics 24 The Current Context 25 Graphics State Information 27 Screen Canvases and Print Canvases 29 Graphics Contexts and Quartz 30 Modifying the Current Graphics State 30 Setting Colors and Patterns 31 Setting Path Attributes 31 Setting Text Attributes 32 Setting Compositing Options 32 Setting the Clipping Region 35 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 2Setting the Anti-aliasing Options 37 Creating Graphics Contexts 38 Creating a Screen-Based Context 39 Creating a PDF or PostScript Context 39 Threading and Graphics Contexts 40 Coordinate Systems and Transforms 41 Coordinate Systems Basics 41 Local Coordinate Systems 41 Points Versus Pixels 43 Resolution-Independent User Interface 44 Transform Basics 45 The Identity Transform 45 Transformation Operations 46 Transformation Ordering 48 Transform Mathematics 50 Using Transforms in Your Code 51 Creating and Applying a Transform 51 Undoing a Transformation 52 Transforming Coordinates 53 Converting from Window to View Coordinates 53 Flipped Coordinate Systems 55 Configuring Your View to Use Flipped Coordinates 56 Drawing Content in a Flipped Coordinate System 56 Creating a Flip Transform 59 Cocoa Use of Flipped Coordinates 60 Doing Pixel-Exact Drawing 61 Tips for Resolution Independent Drawing in Cocoa 62 Accessing the Current Scale Factor 62 Adjusting the Layout of Your Content 63 Converting Coordinate Values 64 Color and Transparency 65 About Color and Transparency 65 Color Models and Color Spaces 65 Color Objects 66 Color Component Values 66 Transparency 66 Pattern Colors 67 Color Lists 68 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 3 ContentsColor Matching 68 Creating Colors 68 Working with Colors 69 Applying Colors to Drawn Content 69 Applying Color to Text 70 Getting the Components of a Color 70 Choosing Colors 71 Working with Color Spaces 71 Converting Between Color Spaces 71 Mapping Physical Colors to a Color Space 72 Images 74 Image Basics 75 Image Representations 75 Images and Caching 77 Image Size and Resolution 80 Image Coordinate Systems 81 Drawing Versus Compositing 82 Supported Image File Formats 83 Basic Formats 83 TIFF Compression 84 Support for Other File Formats 84 Guidelines for Using Images 86 Creating NSImage Objects 87 Loading an Existing Image 87 Loading a Named Image 87 Drawing to an Image by Locking Focus 88 Drawing Offscreen Images Using a Block-Based Drawing Method to Support High Resolution Displays 89 Creating a Bitmap 89 Creating a PDF or EPS Image Representation 93 Using a Quartz Image to Create an NSImage 95 Working with Images 95 Drawing Images into a View 95 Drawing Resizable Textures Using Images 96 Creating an OpenGL Texture 98 Applying Core Image Filters 100 Getting and Setting Bitmap Properties 100 Converting a Bitmap to a Different Format 100 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 4 ContentsAssociating a Custom Color Profile With an Image 101 Converting Between Color Spaces 102 Premultiplying Alpha Values for Bitmaps 108 Creating New Image Representation Classes 109 Advanced Drawing Techniques 111 Adding Shadows to Drawn Paths 111 Creating Gradient Fills 113 Using the NSGradient Class 114 Using Quartz Shadings in Cocoa 118 Drawing to the Screen 119 Capturing the Screen 119 Full-Screen Drawing in OpenGL 120 Full-Screen Drawing in Cocoa 121 Disabling Screen Updates 124 Using NSTimer for Animated Content 124 Using Cocoa Animation Objects 125 Optimizing Your Drawing Code 125 Draw Minimally 125 Avoid Forcing Synchronous Updates 125 Reuse Your Objects 126 Minimize State Changes 126 Text 127 Text Attributes 127 Simple Text Drawing 128 Advanced Text Drawing 128 Paths 130 Path Building Blocks 130 The NSBezierPath Class 131 Path Elements 131 Subpaths 133 Path Attributes 133 Winding Rules 141 Manipulating Geometric Types 142 Drawing Fundamental Shapes 144 Adding Points 144 Adding Lines and Polygons 145 Adding Rectangles 146 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 5 ContentsAdding Rounded Rectangles 146 Adding Ovals and Circles 147 Adding Arcs 148 Adding Bezier Curves 151 Adding Text 151 Drawing the Shapes in a Path 152 Drawing Rectangles 152 Working with Paths 154 Building Paths 154 Improving Rendering Performance 154 Manipulating Individual Path Elements 156 Transforming a Path 157 Creating a CGPathRef From an NSBezierPath Object 157 Detecting Mouse Hits on a Path 160 Incorporating Other Drawing Technologies 162 Using Quartz in Your Application 162 Using Quartz Features 162 Graphics Type Conversions 163 Getting a Quartz Graphics Context 164 Creating a Cocoa Graphics Context Using Quartz 165 Modifying the Graphics State 165 Using OpenGL in Your Application 165 Using NSOpenGLView 165 Creating an OpenGL Graphics Context 166 Using QuickTime in Your Application 167 Using the QuickTime Kit 168 Using QuickTime C-Based Functions 168 Using Quartz Composer Compositions 168 Choosing the Right Imaging Technology 169 Document Revision History 170 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 6 ContentsFigures, Tables, and Listings Overview of Cocoa Drawing 12 Figure 1-1 The painter’s model 14 Figure 1-2 Examples of shape primitives 18 Figure 1-3 Examples of bitmap images 19 Figure 1-4 Examples of text 20 Table 1-1 Primitive data types 17 Table 1-2 Common tasks and solutions 22 Graphics Contexts 24 Figure 2-1 Compositing operations in Cocoa 33 Figure 2-2 Clipping paths and winding rules 36 Figure 2-3 A comparison of aliased and anti-aliased content 38 Table 2-1 Graphics state information 27 Table 2-2 Mathematical equations for compositing colors 34 Coordinate Systems and Transforms 41 Figure 3-1 Screen, window, and view coordinate systems on the screen 42 Figure 3-2 Translating content 46 Figure 3-3 Scaling content 47 Figure 3-4 Rotated content 48 Figure 3-5 Transform ordering 49 Figure 3-6 Basic transformation matrix 50 Figure 3-7 Mathematical conversion of coordinates 50 Figure 3-8 Normal and flipped coordinate axes 55 Figure 3-9 Compositing an image to a flipped view 58 Listing 3-1 Flipping the coordinate system manually 60 Color and Transparency 65 Figure 4-1 Drawing with a pattern 67 Table 4-1 Methods for changing color attributes 69 Table 4-2 Quartz rendering intents 72 Images 74 Figure 5-1 Image orientation in an unflipped view 82 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 7Figure 5-2 Drawing a three-part image 97 Figure 5-3 Drawing a nine-part image 97 Table 5-1 Image representation classes 76 Table 5-2 Image caching modes 78 Table 5-3 Implied cache settings 78 Table 5-4 Image interpolation constants 80 Table 5-5 Cocoa supported file formats 83 Table 5-6 TIFF compression settings 84 Table 5-7 Additional formats supported by Cocoa 85 Listing 5-1 Drawing to an image 88 Listing 5-2 Capturing the contents of an existing image 91 Listing 5-3 Drawing to an offscreen window 92 Listing 5-4 Drawing directly to a bitmap 93 Listing 5-5 Creating PDF data from a view 94 Listing 5-6 Creating an OpenGL texture from an image 98 Listing 5-7 Adding a ColorSync profile to an image 101 Listing 5-8 Creating a bitmap with a custom color profile 102 Listing 5-9 Converting a bitmap to a different color space 104 Listing 5-10 Using a CGImageRef object to create an NSImage object 106 Listing 5-11 Creating a color space from a custom color profile 107 Advanced Drawing Techniques 111 Figure 6-1 Shadows cast by rendered paths 111 Figure 6-2 Different types of gradients 114 Figure 6-3 Axial gradient drawn inside a Bezier path 117 Figure 6-4 Gradient created using primitive drawing method 118 Listing 6-1 Adding a shadow to a path 112 Listing 6-2 Clipping an axial gradient to a rounded rectangle 116 Listing 6-3 Drawing a radial gradient using primitive routine 117 Listing 6-4 Creating an OpenGL full-screen context 120 Listing 6-5 Creating a Cocoa full-screen context 122 Paths 130 Figure 8-1 Path elements for a complex path 132 Figure 8-2 Line cap styles 135 Figure 8-3 Line join styles 136 Figure 8-4 Line dash patterns 137 Figure 8-5 Flatness effects on curves 138 Figure 8-6 Miter limit effects 140 Figure 8-7 Applying winding rules to a path 142 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 8 Figures, Tables, and ListingsFigure 8-8 Inscribing the corner of a rounded rectangle 147 Figure 8-9 Creating arcs 149 Figure 8-10 Cubic Bezier curve 151 Figure 8-11 Stroking and filling a path. 152 Table 8-1 Path element commands 131 Table 8-2 Winding rules 141 Table 8-3 Commonly used geometry functions 143 Table 8-4 Rectangle frame and fill functions 153 Listing 8-1 Creating a complex path 133 Listing 8-2 Setting the line width of a path 134 Listing 8-3 Setting the line cap style of a path 136 Listing 8-4 Setting the line join style of a path 137 Listing 8-5 Adding a dash style to a path 137 Listing 8-6 Setting the flatness of a path 139 Listing 8-7 Setting the miter limit for a path 140 Listing 8-8 Drawing a point 144 Listing 8-9 Using lines to draw a polygon 145 Listing 8-10 Drawing a rectangle 146 Listing 8-11 Drawing a rounded rectangle 147 Listing 8-12 Creating three arcs 149 Listing 8-13 Changing the control point of a curve path element 156 Listing 8-14 Creating a CGPathRef from an NSBezierPath 158 Listing 8-15 Detecting hits on a path 160 Incorporating Other Drawing Technologies 162 Table 9-1 Simple data-type conversions 163 Table 9-2 Equivalent Cocoa and Quartz data types 163 Table 9-3 Imaging technologies 169 Listing 9-1 Creating an OpenGL graphics context 166 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 9 Figures, Tables, and ListingsHigh-quality graphics are an important part of a well-designed application. In fact, high-quality graphicsis one of the things that sets OS X apart from many other operating systems. While some operating systems rely on flat colors and rectangular objects, OS X uses color, transparency, and its advanced compositing system to give programs a more fluid and inviting appearance. At a Glance This document isintended for developers who are new to drawing custom content using Cocoa. More advanced Cocoa developers may also want to read this book for tips on how to perform specific tasks. Before you begin reading this document, you should be familiar with the basic concepts of how to create a Cocoa application. This includes how to create new projects in Xcode, how to create a simple nib file, and how to manipulate Cocoa objects. You do not need any understanding of graphics programming in general, although such knowledge definitely helps. This document assumesthat you have read Cocoa Fundamentals Guide and are familiar with the basic concepts for creating a Cocoa application. This book also assumesthat you have a basic understanding of the Objective-C programming language. This document has the following chapters: ● “Overview of Cocoa Drawing” (page 12) introduces drawing-related concepts and the Cocoa support for drawing. ● “Graphics Contexts” (page 24) describes the drawing environment and provides examples of how you configure the environment to suit your needs. ● “Coordinate Systems and Transforms” (page 41) describes the coordinate systems used for drawing and provides examples of how you manipulate your content using transforms. ● “Color and Transparency” (page 65) provides basic information about color and shows you how to use the color-related Cocoa objects. ● “Paths” (page 130) describes the basic drawing tools found in Cocoa and provides detailed information about how to create and manipulate everything from simple shapes to Bezier paths. ● “Images” (page 74) describes the image classes found in Cocoa and provides examples of how to create and manipulate images in your application. 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 10 Introduction to Cocoa Drawing Guide● “Text” (page 127) provides an overview of text and its relationship to the Cocoa drawing environment. ● “Advanced Drawing Techniques” (page 111) demonstrates some advanced drawing-related techniques, including full-screen drawing, animation, gradients, and performance tuning. ● “Incorporating Other Drawing Technologies” (page 162) provides information and examples on how to integrate advanced technologies, such as Quartz, OpenGL, and QuickTime, into your Cocoa application. See Also Drawing is only one step in the process of creating a fully functional Cocoa view. Understanding view hierarchies and how events interact with views are two other critical steps. For information about these other subjects, consult the following documents: ● View Programming Guide—for information about creating and managing views ● Cocoa Event Handling Guide—for information about event handling To ensure the drawing in your app looks great on a Retina display, consult this document: ● High Resolution Guidelines for OS X Because Cocoa drawing is based on Quartz, many Quartz behaviors (though not all) are also relevant to Cocoa. This document describes the different behaviors provided by Cocoa, but for additional information about Quartz behavior, consult the following documents: ● Quartz 2D Programming Guide—for conceptual information related to Quartz. Introduction to Cocoa Drawing Guide See Also 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 11Drawing is a fundamental part of most Cocoa applications. If your application uses only standard system controls, then Cocoa does all of the drawing for you. If you use custom views or controls, though, then it is up to you to create their appearance using drawing commands. The following sections provide a quick tour of the drawing-related features available in Cocoa. Subsequent chapters provide more details about each feature, and also include examples for many common tasks you might perform during drawing. Cocoa Drawing Support The Cocoa drawing environment is available to all applications built on top of the Application Kit framework (AppKit.framework). This framework defines numerous classes and functions for drawing everything from primitive shapes to complex images and text. Cocoa drawing also relies on some primitive data types found in the Foundation framework (Foundation.framework). The Cocoa drawing environment is compatible with all of the other drawing technologies in OS X, including Quartz, OpenGL, Core Image, Core Video, Quartz Composer, PDF Kit, and QuickTime. In fact, most Cocoa classes use Quartz extensively in their implementations to do the actual drawing. In cases where you find Cocoa does not have the features you need, it is no problem to integrate other technologies where necessary to achieve the desired effects. Because it is based on Quartz, the Application Kit framework provides most of the same features found in Quartz, but in an object-oriented wrapper. Among the features supported directly by the Application Kit are the following: ● Path-based drawing (also known as vector-based drawing) ● Image creation, loading and display ● Text layout and display ● PDF creation and display ● Transparency ● Shadows ● Color management 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 12 Overview of Cocoa Drawing● Transforms ● Printing support ● Anti-aliased rendering ● OpenGL support Like Quartz, the Cocoa drawing environment takes advantage of graphics hardware wherever possible to accelerate drawing operations. This support is automatic. You do not have to enable it explicitly in your code. For information about the classes available in Cocoa, see Application Kit Framework Reference and Foundation Framework Reference . For information on how to integrate C-based technologies into your Cocoa application, see “Incorporating Other Drawing Technologies” (page 162). The Painter’s Model Like Quartz, Cocoa drawing uses the painter’s model for imaging. In the painter’s model, each successive drawing operation applies a layer of “paint” to an output “canvas.” As new layers of paint are added, previously painted elements may be obscured (either partially or totally) or modified by the new paint. This model allows you to construct extremely sophisticated images from a small number of powerful primitives. Overview of Cocoa Drawing The Painter’s Model 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 13Figure 1-1 shows how the painter’s model works and demonstrates how important drawing order can be when rendering content. In the first result, the wireframe shape on the left is drawn first, followed by the solid shape, obscuring all but the perimeter of the wireframe shape. When the shapes are drawn in the opposite order, the results are very different. Because the wireframe shape has more holes in it, parts of the solid shape show through those holes. Figure 1-1 The painter’s model The Drawing Environment The drawing environment encompasses the digital canvas and graphics settings that determine the final look of your content. The canvas determines where your content is drawn, while the graphics settings control every aspect of drawing, including the size, color, quality, and orientation of your content. The Graphics Context You can think of a graphics context as a drawing destination. A graphics context encapsulates all of the information needed to draw to an underlying canvas, including the current drawing attributes and a device-specific representation of the digital paint on the canvas. In Cocoa, graphics contexts are represented by the NSGraphicsContext class and are used to represent the following drawing destinations: ● Windows (and their views) ● Images (including bitmaps of all kinds) Overview of Cocoa Drawing The Drawing Environment 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 14● Printers ● Files (PDF, EPS) ● OpenGL surfaces By far, the most common drawing destination is your application's windows, and by extension its views. Cocoa maintains graphics context objects on a per-window, per-thread basis for your application. This means that for a given window, there are as many graphics contextsfor that window asthere are threadsin your application. Although most drawing occurs on your application's main thread, the additional graphics context objects make it possible to draw from secondary threads as well. For most other drawing operations, Cocoa creates graphics contexts as needed and configures them before calling your drawing code. In some cases, actions you take may create a graphics context indirectly. For example, when creating a PDF file, you might simply request the PDF data for a certain portion of your view object. Behind the scenes, Cocoa actually creates a graphics context object and calls your view's drawing code to generate the PDF data. You can also create graphics contexts explicitly to handle drawing in special situations. For example, one way to create a bitmap image is to create the bitmap canvas and then create a graphics context that draws directly to that canvas. There are other waysto create graphics context objects explicitly, although most involve drawing to the screen or to an image. It is very rare that you would ever create a graphics context object for printing or generating PDF or EPS data. For information about graphics contexts, see “Graphics Contexts” (page 24). The Graphics State In addition to managing the drawing destination, an NSGraphicsContext object also manages the graphics state associated with the current drawing destination. The graphics state consists of attributes that affect the way content is drawn,such asthe line width,stroke color, and fill color. The current graphicsstate can be saved on a stack that is maintained by the current graphics context object. Any subsequent changes to the graphics state can then be undone quickly by simply restoring the previous graphics state. This ability to save and restore the graphics state provides a simple way for your drawing code to return to a known set of attributes. Cocoa manages some attributes of the graphics state in a slightly different way than Quartz does. For example, the currentstroke and fill color are set using the NSColor class, and most path-based parameters are set using the NSBezierPath class. This shift of responsibility reflects the more object-oriented nature of Cocoa. For more information about the attributes that comprise the current graphics state, and the objects that manage them, see “Graphics State Information” (page 27). Overview of Cocoa Drawing The Drawing Environment 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 15The Coordinate System The coordinate system supported by Cocoa is identical to the one used in Quartz-based applications. All coordinates are specified using floating-point valuesinstead of integers. Your code drawsin the user coordinate space. Your drawing commands are converted to the device coordinate space where they are then rendered to the target device. The user coordinate space uses a fixed scale for coordinate values. In this coordinate space, one unit is effectively equal to 1/72 of an inch. Although it seems like this might imply a 72 dots-per-inch (dpi) resolution for drawing, it is a mistake to assume that. In fact, the user coordinate space has no inherent notion of pixels or dpi. The use of floating-point values makes it possible for you to do precise layout in the user coordinate space and let Cocoa worry about converting your coordinates to the device space. As the name implies, the device coordinate space refers to the native coordinate space used by the target device, usually a monitor or printer. Unlike the user coordinate space, whose units are effectively fixed, the units of the device coordinate space are tied to the resolution of the target device, which can vary. Cocoa handles the conversion of coordinates from user space to the device space automatically during rendering, so you rarely need to work with device coordinates directly. For more information about coordinate systems in Cocoa, see “Coordinate Systems Basics” (page 41). Transforms A transform is a mathematical construct used to manipulate coordinatesin two-dimensionalspace. Transforms are used extensively in graphics-based computing to simplify the drawing process. Coordinate values are multiplied through the transform's mathematical matrix to obtain a modified coordinate that reflects the transform's properties. In Cocoa, the NSAffineTransform class implements the transform behavior. You use this class to apply the following effects to the current coordinate system: ● Translation ● Scaling ● Rotation You can combine the preceding effectsin different combinationsto achieve interesting results. During drawing, Cocoa applies the effects to the content you draw, imparting those characteristics on your shapes and images. Because all coordinates are multiplied through a transform at some point during rendering, the addition of these effects has little effect on performance. In fact, manipulating your shapes using transforms is often faster than manipulating your source data directly. Overview of Cocoa Drawing The Drawing Environment 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 16For more information about transforms, including how they affect your content and how you use them, see “Coordinate Systems and Transforms” (page 41). Color and Color Spaces Color is an important part of drawing. Before drawing any element, you must choose the colors to use when rendering that element. Cocoa provides complete support for specifying color information in any of several different color spaces. Support is also provided for creating colors found in International Color Consortium (ICC) and ColorSync profiles. Transparency is another factor that influencesthe appearance of colors. In OS X, transparency is used to render realistic-looking content and aesthetically appealing effects. Cocoa providesfullsupport for adding transparency to colors. In Cocoa, the NSColor and NSColorSpace classes provide the implementation for color objects and color space objects. For more information on how to work with colors in Cocoa, see “Color and Transparency” (page 65). Basic Drawing Elements The creation of complex graphics often has a simple beginning. In Cocoa, everything you draw is derived from a set of basic elementsthat you assemble in your drawing code. These elements are fundamental to all drawing operations and are described in the following sections. Geometry Support Cocoa provides its own data structures for manipulating basic geometric information such as points and rectangles. Cocoa defines the data types listed in Table 1-1. The member fields in each of these data structures are floating-point values. Table 1-1 Primitive data types Type Description A point data type consists of an x and y value. Pointsspecify the coordinatesfor a rendered element. For example, you use points to define lines, to specify the start of a rectangle, to specify the angle of an arc, and so on. NSPoint A size data type consists of a width and height field. Sizes are used to specify dimensions of a target. For example, a size data type specifies the width and height of a rectangle or ellipse. NSSize Overview of Cocoa Drawing Basic Drawing Elements 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 17Type Description A rectangle data type is a compound structure composed of an origin point and a size. The origin field specifiesthe location of the rectangle’s bottom-left corner in the current coordinate system. The size field specifies the rectangle’s height and width relative to the origin point and extending up and to the right. (Note, in flipped coordinate spaces, the origin point is in the upper-left corner and the rectangle’s height and width extend down and to the right.) NSRect For information on how to manipulate point, rectangle, and size data types, see “Manipulating Geometric Types” (page 142). Shape Primitives Cocoa provides support for drawing shape primitives with the NSBezierPath class. You can use this class to create the following basic shapes, some of which are shown in Figure 1-2. ● Lines ● Rectangles ● Ovals and circles ● Arcs ● Bezier cubic curves Figure 1-2 Examples of shape primitives Bezier path objects store vector-based path information, making them compact and resolution independent. You can create paths with any of the simple shapes or combine the basic shapes together to create more complex paths. To render those shapes, you set the drawing attributes for the path and then stroke or fill it to “paint” the path to your view. Overview of Cocoa Drawing Basic Drawing Elements 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 18Note: You can also add glyph outlinesto a Bezier path object using the methods of NSBezierPath. For most text handling, though, you should use the Cocoa text system, which is introduced in “Text” (page 127). For more information about drawing shapes, see “Paths” (page 130). Images Support for images is provided by the NSImage class and its associated image representation classes (NSImageRep and subclasses). The NSImage class contains the basic interface for creating and managing image-related data. The image representation classes provide the infrastructure used by NSImage to manipulate the underlying image data. Images can be loaded from existing files or created on the fly. Figure 1-3 shows some bitmap images loaded from files. Figure 1-3 Examples of bitmap images Cocoa supports many different image formats, either directly or indirectly. Some of the formats Cocoa supports directly include the following: ● Bitmap images, including the following image formats: ● BMP ● GIF ● JPEG ● JPEG 2000 Overview of Cocoa Drawing Basic Drawing Elements 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 19● PNG ● TIFF ● Images based on Encapsulated PostScript (EPS) data ● Images based on Portable Document Format (PDF) data ● Images based on PICT data ● Core Image images Because they support many types of data, you should not think of image objects strictly as bitmaps. Image objects can also store path-based drawing commands found in EPS, PDF, and PICT files. They can render data provided to them by Core Image. They can interpolate image data as needed and render the image at different resolutions as needed. For detailed information about Cocoa support for images and the ways to use images in your code, see “Images” (page 74). Gradients In OS X v10.5 and later, you can use the NSGradient class to create gradient fill patterns. Text Cocoa provides an advanced text system for drawing everything from simple strings to formatted text flows. Figure 1-4 shows some basic examples of stylized text that you can create. Figure 1-4 Examples of text Overview of Cocoa Drawing Basic Drawing Elements 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 20Because text layout and rendering using the Cocoa text system is a very complicated process, it is already well documented elsewhere and is not covered in great detail in this document. For basic information about drawing text and for links to more advanced text-related documents, see “Text” (page 127). Views and Drawing Nearly all drawing in Cocoa is done inside views. Views are objects that represent a visual portion of a window. Each view object is responsible for displaying some visual content and responding to user events in its visible area. A view may also be responsible for one or more subviews. The NSView classisthe base classfor all view-related objects. Cocoa definesseveral types of viewsfor displaying standard content, including text views, split views, tab views, ruler views, and so on. Cocoa controls are also based on the NSView class and implement interface elements such as buttons, scrollers, tables, and text fields. In addition to the standard views and controls, you can also create your own custom views. You create custom views in cases where the behavior you are looking for is not provided by any of the standard views. Cocoa notifies your view that it needsto draw itself by sending your view a drawRect: message. Your implementation of the drawRect: method is where all of your drawing code goes. Note: Although you can also subclassthe standard views and controlsto implement custom behavior, it isrecommended that you try to use a delegate object whenever possible instead. If you do subclass a standard control, avoid changing the appearance of that control. Doing so goes against the guidance in OS X Human Interface Guidelines. By default, window updates occur only in response to user actions. This means that your view’s drawRect: method is called only when something about your view has changed. For example, Cocoa calls the method when a scrolling action causes a previously hidden part of your view to be exposed. Cocoa also calls it in response to requests from your own code. If the information displayed by your custom view changes, you must tell Cocoa explicitly that you want the appropriate parts of your view updated. You do so by invalidating parts of your view’s visible area. Cocoa collects the invalidated regions together and generates appropriate drawRect: messages to redraw the content. Although there are numerous ways to draw, a basic drawRect: method has the following structure: - (void)drawRect:(NSRect)rect { // Draw your content } Overview of Cocoa Drawing Views and Drawing 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 21That's it! By the time your drawRect: method is called, Cocoa has already locked the drawing focus on your view, saved the graphics state, adjusted the current transform matrix to your view's origin, and adjusted the clipping rectangle to your view's frame. All you have to do is draw your content. In reality, your drawRect: method is often much more complicated. Your own method might use several other objects and methodsto handle the actual drawing. You also might need to save and restore the graphics state one or more times. Because this single method is used for all of your view's drawing, it also has to handle several different situations. For example, you might want to do more precise drawing during printing or use heavily optimized code during a live resizing operation. The options are numerous and covered in more detail in subsequent chapters. For additional information about views and live resizing, see View Programming Guide . For more information about printing in Cocoa, see “Customizing a View’s Drawing for Printing” in Printing Programming Guide for OS X . Common Drawing Tasks Table 1-2 lists some of the common tasks related to drawing the content of your view and offers advice on how to accomplish those tasks. Table 1-2 Common tasks and solutions Task How to accomplish Implement a drawRect: method in your custom view. Use your implementation of this method to draw content using paths, images, text, or any other tools available to you in Cocoa, Quartz, or OpenGL. Draw the content for a custom view. Send a setNeedsDisplayInRect: or setNeedsDisplay: message to the view. Sending either of these messages marks part or all of the view as invalid and in need of an update. Cocoa responds by sending a drawRect: message to your view during the next update cycle. Update a custom view to reflect changed content. Use Core Animation, set up a timer, or use the NSAnimation or NSViewAnimation classes, to generate notifications at a desired frame rate. Upon receiving the timer notification, invalidate part or all of your view to force an update. For information about Core Animation, see Core Animation Programming Guide . For more information about animating with timers, see “Using NSTimer for Animated Content” (page 124). For information about using NSAnimation objects, see “Using Cocoa Animation Objects” (page 125). Animate some content in a view. Overview of Cocoa Drawing Common Drawing Tasks 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 22Task How to accomplish Use the inLiveResize method of NSView to determine if a live resize is happening. If it is, draw as little as possible while ensuring your view has the look you want. For more information about live resizing optimizations, see Drawing Performance Guidelines. Draw during a live resize. Use the currentContextDrawingToScreen class method or isDrawingToScreen instancemethod of NSGraphicsContext to determine if a print operation is underway. Use the attributes method of NSGraphicsContext to retrieve (as needed) any additional information about the current print job. Draw images at the best possible resolution. Adjust your graphics in any other ways you think are appropriate to achieve the best possible appearance on the target device. For more information about printing, see Printing Programming Guide for OS X . Draw during a printing operation. Use the dataWithPDFInsideRect: or dataWithEPSInsideRect:method to obtain the data. In your drawRect: method use the currentContextDrawingToScreen class method or isDrawingToScreen instance method of NSGraphicsContext to determine if a print operation is underway. Create PDF or EPS data from a view. Overview of Cocoa Drawing Common Drawing Tasks 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 23Graphics contexts are a fundamental part of the drawing infrastructure in Cocoa applications. As the name suggests, a graphics context provides the context for subsequent drawing operations. It identifies the current drawing destination (screen, printer, file, and so on), the coordinate system and boundaries for the underlying canvas, and any graphics attributes associated with the destination. For most of the drawing you do in Cocoa, you never need to create a graphics context yourself. The normal drawing cycle in Cocoa automatically creates and configures a graphics context for you to use. For some advanced drawing, however, you may need to create your own graphics context prior to drawing. In a Cocoa application, graphics contexts for nearly all types of canvas are represented by the NSGraphicsContext class. You use graphics context objects to manipulate graphics attributes and to get information about the current drawing environment. Note: For OpenGL drawing, you use the NSOpenGLContext classinstead of NSGraphicsContext for the graphics context object. OpenGL drawing, and use of the NSOpenGLContext class, are covered in “Using OpenGL in Your Application” (page 165). This chapter provides an overview of Cocoa graphics contexts and how you use them in your application. It includes information on how to create custom graphics contexts and when it might be appropriate to do so. Graphics Context Basics The primary job of any graphics context object isto maintain information about the currentstate of the drawing environment. In Quartz, the graphics context object is associated with a window, bitmap, PDF file, or other output device and maintains information for that device. The same is true for a Cocoa graphics context, but because Cocoa drawing is view-based, some additional changes are made to the drawing environment before your view’s drawRect: method is called. By the time your view’s drawRect: method is called, Cocoa has made sure that any drawing calls you make stay within the confines of your view. It saves the graphics state to simplify the process of undoing its changes later. It adds an appropriate transform to the current transformation matrix to place the drawing origin at the 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 24 Graphics Contextsorigin of your view. It also sets the clipping region to your view's visible boundaries, preventing any rendered content from straying into other views. Your view is effectively the star of the show, at least until another view’s drawRect: method is called. While the current context is focused on your view, you can draw paths, images, text, or any other content you want. You can also change the attributes of the current drawing environment to achieve the appearance you want for your content. Eventually, the content you draw is sent to the Quartz Compositor, where it is combined with the content from other views in the window and flushed to the screen or output device. After your drawRect: method returns, Cocoa goesthrough the process of resetting the drawing environment for the next view. It reverts any changes you made to the drawing environment and sets up the coordinate transform and clipping region for the next view, giving it its own pristine environment in which to work. This process then repeats itself during each update cycle in your application. The Current Context Each thread in a Cocoa application has its own graphics context object for a given window. You can access this object from your code using the currentContext method of NSGraphicsContext, as shown in the following example: NSGraphicsContext* aContext = [NSGraphicsContext currentContext]; The currentContext method always returns the Cocoa graphics context object that is appropriate for the current drawing environment. This object keeps track of the current graphics state, lets you save and restore graphics state information, and lets you modify many graphics state attributes. The changes you make to the graphics state affect all subsequent drawing calls. If you change an attribute more than once, only the most recent setting is used. To save the current graphics state, you use the saveGraphicsState method of NSGraphicsContext. This method essentially pushes a copy of the current state onto a stack, leaving you free to make changes to the currentstate. When you want to revert back to the previousstate, you simply call the restoreGraphicsState method to pop the current graphics state (including all changes since the last save) off of the stack and restore the previous state. If you plan to change the current graphics state significantly, it is a good idea to save the current state before making your changes. Modifying one or two attributes usually may not merit saving the graphics state, since you can reset or change those individual attributes easily. However, if you are changing more than one or two attributes, it is usually easier to save and restore the entire graphicsstate. You can call the saveGraphicsState method as often as needed in your code to save snapshots of the current graphics state, but you must be sure to balance each call with a matching call to restoreGraphicsState. Graphics Contexts Graphics Context Basics 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 25Note: The saveGraphicsState and restoreGraphicsState methods are available both as class methods and as instance methods. The class method versions simply save and restore the graphicsstate of the current context. The instance methodslet you save the state of a specific context object, although in most cases this should be the current context. The following example shows a simple drawRect: method that iterates over an array of developer-defined objects, each of which is drawn with a differentset of attributes. The graphicsstate issaved and restored during each loop iteration, ensuring that each object starts from the same graphics state. - (void)drawRect:(NSRect)rect { NSGraphicsContext* theContext = [NSGraphicsContext currentContext]; int i; int numObjects = [myObjectArray count]; // Iterate over an array of objects // Set the attributes for each before drawing for (i = 0; i < numObjects; i++) { [theContext saveGraphicsState]; // Set the drawing attributes // Draw the object [theContext restoreGraphicsState]; } } Warning: When saving and restoring the graphics state, you must balance all calls to saveGraphicsState with a corresponding call to restoreGraphicsState. Failure to do so can result in unexpected changes to the appearance of any windows that use that view. Graphics Contexts Graphics Context Basics 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 26Graphics State Information Each Cocoa graphics context object maintainsinformation about the currentstate of the drawing environment. This information ranges from the global rendering settings to the attributes used to render the current path and is the same state information saved by Quartz. Whenever you save the current graphics state, you save a copy of the settings listed in Table 2-1. Table 2-1 Graphics state information Attribute Description Maps points in the view’s coordinate system to points in the destination device's coordinate system. Cocoa modifies the CTM before calling your view’s drawRect: method. You can use an NSAffineTransform object to modify the CTM further to change the drawing origin, scale the canvas, or rotate the coordinate system. For more information, see “Coordinate Systems and Transforms” (page 41). Current transformation matrix (CTM) Specifiesthe area of the canvasthat can be painted by drawing calls. Cocoa modifies the clipping region to the visible area of your view before calling its drawRect: method. You can use an NSBezierPath object to further clip the visible area. For more information, see “Setting the Clipping Region” (page 35). Clipping area Specifies the width of paths. The default line width is 1.0 but you can modify this value using an NSBezierPath object. For more information,see “Line Width” (page 134). Line width Specifies how two connected lines are joined together. The default join style is NSMiterLineJoinStyle but you can modify this value using an NSBezierPath object. For more information, see “Line Join Styles” (page 136). Line join style Specifies the appearance of an open end point on a path. The default line cap style is NSButtLineCapStyle but you can modify this value using an NSBezierPath object. For more information, see “Line Cap Styles” (page 135). Line cap style Defines a broken pattern for lines, including the initial phase for the style. There is no default dash style, resulting in solid lines. You modify dash styles for a path using an NSBezierPath object. For more information, see “Setting Path Attributes” (page 31). Line dash style Determines when lines should be joined with a bevel instead of a miter. Applies only when the line join style is set to NSMiterLineJoinStyle. The length of the miter is divided by the line width. If the resulting value is greater than the miter limit, a bevel is used. The default value is 10.0 but you can modify this value using an NSBezierPath object. For more information, see “Miter Limits” (page 139). Line miter limit Graphics Contexts Graphics Context Basics 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 27Attribute Description Specifies the accuracy with which curves are rendered. (It is also the maximum error tolerance, measured in pixels.) Smaller numbers result in smoother curves at the expense of more calculations. The interpretation of this value may vary slightly on different rendering devices. The default value is 0.6 but you can modify this value using an NSBezierPath object. For more information, see “Line Flatness” (page 138). Flatness value Specifies the color used for rendering paths. This color applies only to the path line itself, not the area the path encompasses. You can specify colors using any of the system-supported color spaces. This value includes alpha information. Color information is managed by the NSColor class. For more information, see “Setting Colors and Patterns” (page 31). Stroke color Specifies the color used to fill the area enclosed by a path. You can specify colors using any of the system-supported color spaces. This value includes alpha information. Color information is managed by the NSColor class. For more information, see “Setting Colors and Patterns” (page 31). Fill color Specifies the shadow attributes to apply to rendered content. You set shadows using the NSShadow class. For more information, see “Adding Shadows to Drawn Paths” (page 111). Shadow Specifies the technique used to map in-gamut colors to the gamut of the current color space. Cocoa does not support setting this attribute directly. Instead, you must use Quartz. For more information, see “Mapping Physical Colors to a Color Space” (page 72). Rendering intent Specifies the font to use when drawing text. You modify font information using the NSFont class. For more information on drawing text,see “Text Attributes” (page 127). Font name Specifiesthe fontsize to use when drawing text. You modify font information using the NSFont class. For more information on drawing text,see “Text Attributes” (page 127). Font size Specifiesthe characterspacing to use when drawing text. (This attribute issupported only indirectly by Cocoa.) For more information on drawing text, see “Text Attributes” (page 127). Font character spacing Specifies how to render the text. (This attribute is supported only indirectly by Cocoa.) For more information on drawing text, see “Text Attributes” (page 127). Text drawing mode Specifies the process used to interpolate images during rendering. You use the NSGraphicsContext class to change this setting. For more information, see “Image Size and Resolution” (page 80) Image interpolation quality Graphics Contexts Graphics Context Basics 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 28Attribute Description Specifies the process used to composite source and destination material together. (The compositing operations supported by Cocoa are related to the Quartz blend modes but differ in their usage and behavior.) You use the NSGraphicsContext classto set the default value for thissetting. Some rendering methods and functions may let you specify a different option. For more information, see “Setting Compositing Options” (page 32). Compositing operation Specifies a global alpha (transparency) value to apply in addition to the alpha value for a given color. Cocoa does not support this attribute directly. If you want to set it, you must use the CGContextSetAlpha function in Quartz. Global alpha Specifies whether paths use aliasing to smooth lines asthey cross pixel boundaries. You use the NSGraphicsContext class to change this setting. For more information, see “Setting the Anti-aliasing Options” (page 37). Anti-aliasing setting Note: The winding rule used to fill paths is not stored as part of the current graphics state. You can set a default winding rule for NSBezierPath objects but doing so affects content rendered using those objects. For more information, see “Winding Rules” (page 141). Screen Canvases and Print Canvases In a broad sense, Cocoa graphics context objects serve two types of canvases: screen-based canvases and print-based canvases. A screen-based graphics context renders content to a window, view, or image with the results usually appearing on a screen. A print-based graphics context is used to render content to a printer spool file, PDF file, PostScript file, EPS file, or other medium usually associated with the printing system. For nearly all screen-based and print-based drawing, Cocoa provides an appropriate graphics context object automatically. Cocoa provides a graphics context object during all view updates and in response to the user printing a document. There are situations, however, where you must create a graphics context object manually, including the following: ● Using OpenGL commands to render your view content ● Drawing to an offscreen bitmap ● Creating PDF or EPS data ● Initiating a print job programmatically Using the class methods of NSGraphicsContext, you can create graphics context objects for drawing to screen-based canvases. You cannot use these methods for print-based canvas, however. Cocoa routes all printing operations through the Cocoa printing system, which handles the task of setting up the graphics Graphics Contexts Graphics Context Basics 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 29context object for you. This means that if you want to generate PDF data, EPS data, or print to a printer, you must use the methods of the NSPrintOperation class to create a print job for your target. It also means that your views should provide some minimal printing support if you want to produce well-formatted output for print-based canvases. Note: Although Cocoa does provide some support for creating OpenGL graphics contexts automatically, the default pixel format options are usually limited. In most cases, you will want to create a custom OpenGL graphics context with the pixel format options you need for drawing. For more information, see “Creating an OpenGL Graphics Context” (page 166). You can determine the type of canvas being managed by the current graphics context using the isDrawingToScreen instance method or currentContextDrawingToScreen class method of NSGraphicsContext. For print-based canvases, you can use the attributes method to get additional information about the canvas, such as whether it is being used to generate a PDF or EPS file. For more information about obtaining contexts for both screen-based and print-based canvases, see “Creating Graphics Contexts” (page 38). Graphics Contexts and Quartz The NSGraphicsContext class in Cocoa is a wrapper for a Quartz graphics context (CGContextRef data type). Both types manage the same basic information, and in fact, many methods of NSGraphicsContext simply call their Quartz equivalents. This relationship makes it easy to perform any Quartz-related drawing in your application. It also means that any time you have a Cocoa graphics context (an instance of the NSGraphicsContext class), you have a Quartz graphics context as well. For information on how to use Cocoa graphics contexts to call Quartz functions, see “Using Quartz in Your Application” (page 162). Modifying the Current Graphics State In your view’s drawRect: method, one of the first things you may want to do is modify the current drawing environment. For example, you might want to configure the current drawing colors, modifying the clipping region, transform the coordinate system, and so on. Many attributes can be set directly using the methods of NSGraphicsContext but some require the use of other objects. The following sections list the available drawing attributes and how you modify them. Graphics Contexts Modifying the Current Graphics State 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 30Important: Saving and restoring the current graphics state is a relatively expensive operation that should done as little as possible. In general, you should try to save and restore the graphics state only to undo several changes at once or when there is no alternative, such as to reset the clipping path. For individual changes, setting a new value directly is often more efficient than saving and restoring the entire graphics state. Setting Colors and Patterns Cocoa providessupport for colorsin a variety of different colorspaces. The NSColor classsupports RGB, CMYK, and grayscale color spaces by default but can also support custom color spaces defined by ICC and ColorSync profiles. The colors you specify include the color channels appropriate for the color space and an optional alpha component to define the transparency of the color. To set the currentstroke or fill attributes, create an NSColor object and send it a set, setStroke, or setFill message. The stroke and fill attributes define the color or pattern for paths and the areas they enclose. The currentstroke and fill colors affect all drawn content except text, which requiresthe application of text attributes; see “Applying Color to Text” (page 70). For more information about colors and how to create them, see “Color and Transparency” (page 65). Setting Path Attributes To modify the value of path attributes, you use the NSBezierPath class. Using the methods of this class, you can set the line width, line join style, line dash style, line cap style, miter limit, flatness, and winding rule attributes. All of these attributes affect the way paths are rendered by Cocoa. Path attributes come in two flavors: global and path-specific. When you use the class methodsin NSBezierPath to set the "default" value for an attribute, you are setting the global attribute. Global attributes are global to path objects (as opposed to the graphics state), so setting a global attribute affects all paths you render using the NSBezierPath class, but does not affect Quartz-based paths. To override a global attribute for an individual path object, you should set a path-specific value. For example, to set the global line width, you use the setDefaultLineWidth: class method of NSBezierPath. To set the line width for a specific NSBezierPath object, you use its setLineWidth: instance method. For information on how to set both default and path-specific attributes, and to see the resulting appearance of rendered content, see “Path Attributes” (page 133). Graphics Contexts Modifying the Current Graphics State 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 31Setting Text Attributes For most string-based drawing in Cocoa, you apply text attributes directly to the strings, rather than relying on the global font settings. The Cocoa string objects and the Cocoa text system both support the use of attributesfor modifying the appearance ofstring. For NSAttributedString objects, you apply the attributes directly to character ranges in the string. For regular NSString objects, you apply the attributes to the entire string when you draw it. If you want to set the global fontsettingsstored in the graphicsstate, perhapsfor drawing strings using Quartz, you can use the NSFont object to set the font family and size. After creating a font object, you use its set method to apply the font information to the current graphics state. For more information about drawing options for text, see “Text” (page 127). For more information about the Cocoa text system, see Cocoa Text Architecture Guide . Setting Compositing Options When you render each visual element, you need to decide how that element interacts with any surrounding content. You might want the element to be layered on top of or behind the current content or be merged with it in interesting ways. You specify this behavior using different compositing options. Compositing options specify how the colors in source content are blended with the existing content in the drawing destination. With fully opaque colors, most compositing optionssimply mask or overlay different parts of the source and destination content. With partially transparent colors, however, you can achieve interesting blending effects. The Cocoa compositing options differ from the blend modes used in Quartz, although the two perform basically the same task. The Cocoa options are inherited from the NextStep environment, whereas the Quartz blend modes are part of the newer PDF-based rendering model. Despite their historical legacy, the Cocoa options are still a very powerful way to composite content, and may even be a little easier to understand than their Quartz counterparts. Graphics Contexts Modifying the Current Graphics State 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 32Important: Despite their similarities, there is no direct mapping between the Cocoa compositing options and the Quartz blend modes. In addition, when drawing to a print-based canvas, you should use only the NSCompositeCopy or the NSCompositeSourceOver operators. (For PDF content, you should use only the NSCompositeSourceOver operator or the Quartz blend modes.) If you need to use any other compositing operators, you should render your content to an image and then draw the image to the printing context using one of the supported operators. If your application relies heavily on PDF blend modes, you may want to use Quartz for your drawing instead. Figure 2-1 shows the Cocoa compositing options and how they affect rendered content. At the top of the figure are the source and destination content being rendered. The veins of the leaf are completely transparent while the rest of the leaf is opaque. In the destination image, the color is rendered at partial opacity. Below that are the results for each of the supported compositing operations. Figure 2-1 Compositing operations in Cocoa Graphics Contexts Modifying the Current Graphics State 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 33Table 2-2 lists the mathematical equations used to compute pixel colors during compositing operations. In each equation, R is the resulting (premultiplied) color, S is the source color, D is the destination color, Sa is the alpha value of the source color, and Da is the alpha value of the destination color. All color component values and alpha values are in the range 0 to 1 for these computations. Table 2-2 Mathematical equations for compositing colors Para Para NSCompositeClear R = 0 NSCompositeCopy R = S NSCompositeSourceOver R = S + D*(1 - Sa) NSCompositeSourceIn R = S*Da NSCompositeSourceOut R = S*(1 - Da) NSCompositeSourceAtop R = S*Da + D*(1 - Sa) NSCompositeDestinationOver R = S*(1 - Da) + D NSCompositeDestinationIn R = D*Sa NSCompositeDestinationOut R = D*(1 - Sa) NSCompositeDestinationAtop R = S*(1 - Da) + D*Sa NSCompositeXOR R = S*(1 - Da) + D*(1 - Sa) NSCompositePlusDarker R = MAX(0, (1 - D) + (1 - S)) NSCompositePlusLighter R = MIN(1, S + D) To set the current compositing operation, you use the setCompositingOperation: method of NSGraphicsContext. This sets the global compositing option to use if no other operator is specified. The default compositing option is NSCompositeSourceOver. Graphics Contexts Modifying the Current Graphics State 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 34Setting the Clipping Region The clipping region is a useful way to limit drawing to a specific portion of your view. Instead of creating complex graphics offscreen and then compositing them precisely in your view, you can use a clipping region to mask out the portions of your view you do not want modified. For example, you might use a clipping region to prevent drawing commands from drawing over some already rendered content. Similarly, you might use a clipping region to cut out specific portions of an image you want to render. Before invoking your view’s drawRect: method, Cocoa configures the clipping region of the current graphics context to match the visible area of your view. This prevents your view's drawing code from rendering content outside of your view's boundaries, possibly on top of other views. You can restrict the drawable region of your view even further by adding shapesto the current clipping region. Whenever you add a new shape to the current clipping region, Cocoa determinesthe intersection of the shape with the current clipping region and uses the result as the new clipping region. This behavior means that you should generally add only one shape to the clip region before doing your drawing. The shape you add can be a single rectangle, multiple rectangles, or a combination of multiple complex subpathsin a single NSBezierPath object. For simple rectangular shapes, the easiest way to clip is using the NSRectClip function. To specify multiple rectangular regions, use the NSRectClipList function instead. To clip your view to a nonrectangular region, you must use an NSBezierPath object. The path you create can be arbitrarily complex and include multiple rectangular and nonrectangular regions. Once you have the path you want, use the object’s addClip method to add the resulting shape to the current clipping region. (For information on how to create paths,see “Drawing Fundamental Shapes” (page 144).) Graphics Contexts Modifying the Current Graphics State 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 35Figure 2-2 shows the effects of applying a clipping path to an image. The top images show the image to be clipped and the path to use for the clip shape, which in this case consists of two shapes inside a single NSBezierPath object. Although the clip shape is the same in both cases, the resulting clip region is different. This is because clipping takes into account the current winding rule when calculating the clipping region. Figure 2-2 Clipping paths and winding rules The following example shows you how to create the clip region shown in Figure 2-2. The clip region is composed of an overlapping square and circle, so you simply add a rectangle and oval with the appropriate sizes to a Bezier path object and call the addClip method. // If you plan to do more drawing later, it's a good idea // to save the graphics state before clipping. [NSGraphicsContext saveGraphicsState]; // Create the path and add the shapes NSBezierPath* clipPath = [NSBezierPath bezierPath]; [clipPath appendBezierPathWithRect:NSMakeRect(0.0, 0.0, 100.0, 100.0)]; Graphics Contexts Modifying the Current Graphics State 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 36[clipPath appendBezierPathWithOvalInRect:NSMakeRect(50.0, 50.0, 100.0, 100.0)]; // Add the path to the clip shape. [clipPath addClip]; // Draw the image. [NSGraphicsContext restoreGraphicsState]; Warning: Although you can also use the setClip method of NSBezierPath to modify the clipping region, doing so is not recommended. The setClip method replaces the entire clipping region with the area you specify. If the new clipping region extends beyond the bounds of your view, this could lead to portions of your content spilling over into neighboring views. Setting the Anti-aliasing Options Cocoa graphics contextssupport anti-aliasing in the same way that their Quartz counterparts do. Anti-aliasing is the process of artificially correcting the jagged (or aliased) edges surrounding text or shapes in bitmap images. These jagged edges occur primarily in lower-resolution bitmaps where it is easier to see individual pixels. To remove the jagged edges, Cocoa uses different colors for the pixels that surround a shape’s outline. Graphics Contexts Modifying the Current Graphics State 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 37The colors it uses are a blend of the original pixel color and the color of the shape’s outline. By blending colors in this way, the edges of the shape appear much smoother. Figure 2-3 shows the same image aliased and anti-aliased. Figure 2-3 A comparison of aliased and anti-aliased content To enable or disable anti-aliasing, use the setShouldAntialias: method of NSGraphicsContext. Even with anti-aliasing disabled, it may still appears as if Cocoa is drawing content using aliasing. When drawing content on non-pixel boundaries, Cocoa may opt to split the line over multiple pixels, which can give the impression of aliasing. For more information about how to avoid this situation, see “Doing Pixel-Exact Drawing” (page 61). Creating Graphics Contexts The type of drawing you do in your application will determine whether you need to create any graphics context objects explicitly orsimply use the one Cocoa provides you. If all you do is draw in your views, you can probably just use the Cocoa-provided context. This is true both for screen-based and print-based drawing. If your application performs any other type of drawing, however, you may need to create a graphics context yourself. The following sections provide information on how and when to create Cocoa graphics contexts for your content. Graphics Contexts Creating Graphics Contexts 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 38Creating a Screen-Based Context If you want to do any drawing outside of the normal update cycle of your view, you must create a graphics context object explicitly. You might use this technique to draw in an offscreen window or bitmap and then copy the resulting bits elsewhere. You could also use it to draw to a window from a secondary thread. The NSGraphicsContext classincludes methodsfor creating new graphics context objectsspecifically for windows and bitmap images. To draw to a window, you can use the graphicsContextWithWindow: method of NSGraphicsContext. The context you get back is initialized to the window itself, and not to a specific view. In fact, you may not want to use this technique if the window contains many subviews. In order to draw the views properly, you would need to walk the list of subviews manually and configure the drawing environment for each one, which is not recommended. Instead, you would use this technique for drawing to an offscreen buffer. Important: Because most OS X windows are already double-buffered, do not use offscreen windows or bitmaps simply to update the contents of a window. Doing so wastes memory (by adding a third buffer) and requires an extra copy operation to transfer the bits from the offscreen window to the window buffer. To draw to a bitmap, you have two options. If your code runs in OS X v10.4 and later, you can use the graphicsContextWithBitmapImageRep: method to create a context object focused on an NSBitmapImageRep object. The drawing you do is then rendered directly to the bitmap. If your code must run on earlier versions of OS X, you must either lock focus on a view or use an offscreen window and then capture the contents of the view or window. For information and examples on how to create bitmaps, see “Creating a Bitmap” (page 89) Creating a PDF or PostScript Context Unlike screen-based contexts, if you want to create a graphics context for a PDF, EPS, or print-based canvas, you do not do so directly. All print-based operations must go through the Cocoa printing system, which handles the work required for setting up the printed pages and running the print job. The simplest way to create a PDF or EPS file is to use the dataWithPDFInsideRect: and dataWithEPSInsideRect: methods of NSView. These methods configure a print job automatically and use your view's existing drawing code to generate the PDF or EPS data. For more information and an example of how to use these methods, see “Creating a PDF or EPS Image Representation” (page 93). To create a print job manually, you use the NSPrintOperation class. This class offers several class methods for creating print jobs for a particular view and outputting the job to a printer, PDF file, or EPS file. Once you have an instance of the NSPrintOperation class, you can set the print information and use the runOperation method to start the print job, at which point Cocoa takes over. Graphics Contexts Creating Graphics Contexts 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 39Important: You cannot create a viable graphics context for PDF or PostScript canvases using the graphicsContextWithAttributes: method. You must go through the Cocoa Printing system instead. During the execution of a print job, Cocoa calls several methods of your view to handle page layout and drawing. These methods are called for all printing paths, so implementing them for printing will also support PDF and EPS. For information on how to implement these methods, see Printing Programming Guide for OS X . Threading and Graphics Contexts The Application Kit maintains a unique graphics context for each window and thread combination. Because each thread has its own graphics context object for a given window, it is possible to use secondary threads to draw to that window. There are some caveats, however. During the normal update cycle for windows, all drawing requests are sent to your application’s main thread for processing. The normal update cycle happens when a user event triggers a change in your user interface. In this situation, you would call the setNeedsDisplay: or setNeedsDisplayInRect: method (or the display family of methods) from your application’s main thread to invalidate the portions of your view that require redrawing. You should not call these methods from any secondary threads. If you want to update a window or view from a secondary thread, you must manually lock focus on the window or view and initiate drawing yourself. Locking focus configures the drawing environment for that window's graphics context. Once locked, you can configure the drawing environment, issue your drawing commands as usual, and then flush the contents of the graphics context to the window buffer. In order to draw regularly on a secondary thread, you must notify the thread yourself. The simplest way to send regular notifications is using an NSTimer or NSAnimation object. For more information on how to animate content, see “Advanced Drawing Techniques” (page 111). Creating bitmaps on secondary threads is one way to thread your drawing code. Because bitmaps are self-contained entities, they can be created safely on secondary threads. From your thread, you would need to create the graphics context object explicitly (as described in “Creating a Screen-Based Context” (page 39)) and then issue drawing calls to draw into the bitmap buffer. For more information on how to create bitmaps, including sample code, see “Creating a Bitmap” (page 89). Important: Although drawing on secondary threads is allowed, you should always handle events and other user-requested actions from your application’s main thread only. Using multiple threads to handle events can lead to processing those events out of sequence, which can cause inconsistencies in your application’s behavior. Graphics Contexts Threading and Graphics Contexts 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 40Coordinate spaces simplify the drawing code required to create complex interfaces. In a standard Mac app, the window represents the base coordinate system for drawing, and all content must eventually be specified in that coordinate space when it is sent to the window server. For even simple interfaces, however, it is rarely convenient to specify coordinates relative to the window origin. Even the location of fixed items can change and require recalculation when the window resizes. This is where Cocoa makes things simple. Each Cocoa view you add to a window maintains its own local coordinate system for drawing. Rather than convert coordinate valuesto window coordinates, you simply draw using the local coordinate system, ignoring any changes to the position of the view. Before sending your drawing commands to the window server, Cocoa automatically corrects coordinate values and puts them in the base coordinate space. Even with the presence of local coordinate spaces, it is often necessary to change the coordinate space temporarily to affect certain behaviors. Changing the coordinate space is done using mathematical transformations (also known as transforms). Transforms convert coordinate values from one coordinate space to another. You can use transforms to alter the coordinate system of a view in a way that affects subsequent rendering calls, or you can use them to determine the location of points in the window or another view. The following sections provide information about how Cocoa manages the local coordinate systems of your views and how you can use transforms to affect your drawing environment. Coordinate Systems Basics Cocoa and Quartz use the same base coordinate system model. Before you can draw effectively, you need to understand this coordinate space and how it affects your drawing commands. It also helps to know the ways in which you can modify the coordinate space to simplify your drawing code. Local Coordinate Systems Cocoa uses a Cartesian coordinate system asits basic model forspecifying coordinates. The origin in thissystem is located in the lower-left corner of the current drawing space, with positive values extending along the axes up and to the right of the origin point. The root origin for the entire system is located in the lower-left corner of the screen containing the menu bar. 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 41 Coordinate Systems and TransformsIf you were forced to draw all your content in screen coordinates—the coordinate system whose origin is located at the lower-left corner of the computer’s primary screen—your code would be quite complex. To simplify things, Cocoa sets up a local coordinate system whose origin is equal to the origin of the window or view that is about to draw. Subsequent drawing calls inside the window or view take place relative to this local coordinate system. Once the code finishes drawing, Cocoa and the underlying graphics system convert coordinates in the local coordinates back to screen coordinates so that the content can be composited with content from other applications and sent to the graphics hardware. Note: If a computer has multiple monitors attached, those monitors can be set to mirror each other or to display one contiguous desktop. In mirroring mode, every screen has an origin of (0, 0). In contiguous mode, one screen has an origin of (0, 0) but other screens have origins that are offset from that of the first screen. Figure 3-1 shows the coordinate-system origin points of the screen, a window, and a view. In each case, the value to the bottom-left of each point is the coordinate measured in its parent coordinate system. (The screen does not have a parent coordinate system, so both coordinate values are 0). The window’s parent is the screen and the view’s parent is the window. Figure 3-1 Screen, window, and view coordinate systems on the screen Coordinate Systems and Transforms Coordinate Systems Basics 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 42Mapping from screen coordinatesto local window or view coordinatestakes place in the current transformation matrix (CTM) of the Cocoa graphics context object. Cocoa applies the CTM automatically to any drawing calls you make,so you do not need to convert coordinate values yourself. You can modify the CTM though to change the position and orientation of the coordinate axesinside your view. (For more information,see “Transformation Operations” (page 46).) Points Versus Pixels The drawing system inOS X is based on a PDF drawing model, which is a vector-based drawing model. Compared to a raster-based drawing model, where drawing commands operate on individual pixels, drawing commands in OS X are specified using a fixed-scale drawing space, known as the user coordinate space. The system then maps the coordinates in this drawing space onto the actual pixels of the corresponding target device, such as a monitor or printer. The advantage of this model is that graphics drawn using vector commands scale nicely to any resolution device. As the device resolution increases, the system is able to use any extra pixels to create a crisper look to the graphics. In order to maintain the precision inherent with a vector-based drawing system, drawing coordinates are specified using floating-point values instead of integers. The use of floating-point values for OS X coordinates makes it possible for you to specify the location of your program's content very precisely. For the most part, you do not have to worry about how those values are eventually mapped to the screen or other output device. Instead, Cocoa takes care of this mapping for you. Even though the drawing model is based on PDF, there are still times when you need to render pixel-based content. Bitmap images are a common way to create user interfaces, and your drawing code may need to make special adjustmentsto ensure that any bitmap images are drawn correctly on different resolution devices. Similarly, you may want to ensure that even your vector-based graphics align properly along pixel boundaries so that they do not have an anti-aliased appearance. OS X provides numerous facilities to help you draw pixel-based content the way you want it. The following sections provide more detail about the coordinate spaces used for drawing and rendering content. There also follows some tips on how to deal with pixel-specific rendering in your drawing code. User Space The user coordinate space in Cocoa is the environment you use for all your drawing commands. It represents a fixed scale coordinate space, which means that the drawing commands you issue in this space result in graphics whose size is consistent regardless of the resolution of the underlying device. Units in the user space are based on the printer's point, which was used in the publishing industry to measure the size of content on the printed page. A single point is equivalent to 1/72 of an inch. Points were adopted by earlier versions of Mac OS as the standard resolution for content on the screen. OS X continues to use the same effective “resolution” for user-space drawing. Coordinate Systems and Transforms Coordinate Systems Basics 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 43Although a single point often corresponded directly to a pixel in the past, in OS X, that may not be the case. Points are not tied to the resolution of any particular device. If you draw a rectangle whose width and height are exactly three points, that does not mean it will be rendered on the screen as a three-pixel by three-pixel rectangle. On a 144 dpi screen, the rectangle might be rendered using six pixels per side, and on a 600-dpi printer, the rectangle would require 25 pixels per side. The actual translation from points to pixels is device dependent and handled for you automatically by OS X. For all practical purposes, the user coordinate space is the only coordinate space you need to think about. There are some exceptions to this rule, however, and those are covered in “Doing Pixel-Exact Drawing” (page 61). Device Space The device coordinate space refers to the native coordinate space used by the target device, whether it be a screen, printer, file, or some other device. Units in the device coordinate space are specified using pixels and the resolution of this space is device dependent. For example, most monitors have resolutions in the 100 dpi range but printers may have resolutions exceeding 600 dpi. There are some devices that do not have a fixed resolution, however. For example, PDF and EPS files are resolution independent and can scale their content to any resolution. For Cocoa users, the device coordinate space is something you rarely have to worry about. Whenever you generate drawing commands, you always specify positions using user space coordinates. The only time that you might need to know about device space coordinates is when you are adjusting your drawn content to map more cleanly to a specific target device. For example, you might use device coordinates to align a path or image to specific pixel boundaries in order to prevent unwanted anti-aliasing. In such a situation, you can adjust your user space coordinates based on the resolution of the underlying device. For information on how to do this, see “Doing Pixel-Exact Drawing” (page 61) Resolution-Independent User Interface In OS X v10.4 and earlier, Quartz and Cocoa always treated screen devices as if their resolution were always 72 dpi, regardless of their actual resolution. This meant that for screen-based drawing, one point in user space was always equal to one pixel in device space. As screens advanced well past 100 dpi in resolution, the assumption that one point equaled one pixel began to cause problems. Most noticeably, everything became much smaller. In OS X v10.4, the first steps at decoupling the point-pixel relationship took place. In OS X v10.4, support was added for resolution independence in application user interfaces. The initial implementation of this feature provides a way for you to decouple your application’s user space from the underlying device space manually. You do this by choosing a scale factor for your user interface. The scale factor causes user space content to be scaled by the specified amount. Code that is implemented properly for resolution independence should look fine (albeit bigger). Code that is not implemented properly may see Coordinate Systems and Transforms Coordinate Systems Basics 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 44alignment problems or pixel cracks along shape boundaries. To enable resolution independence in your application, launch Quartz Debug and choose Tools > Show User Interface Resolution, then set your scale factor. After changing the resolution, relaunch your application to see how it responds to the new resolution. For the most part, Cocoa applicationsshould not have to do anything special to handle resolution-independent UI. If you use the standard Cocoa views and drawing commands to draw your content, Cocoa automatically scales any content you draw using the current scale factor. For path-based content, your drawing code should require little or no changes. For images, though, you may need to take steps to make sure those images look good at higherscale factors. For example, you might need to create higher-resolution versionsto take advantage of the increased screen resolution. You might also need to adjust the position of images to avoid pixel cracks caused by images being drawn on non-integral pixel boundaries. For tips on how to make sure your content draws well at any resolution, see “Doing Pixel-Exact Drawing” (page 61). For more information about resolution independence and how it affects your code, see High Resolution Guidelines for OS X . Transform Basics Transforms are a tool for manipulating coordinates (and coordinate systems) quickly and easily in your code. Consider a rectangle whose origin is at (0, 0). If you wanted to change the origin of this rectangle to (10, 3), it would be fairly simple to modify the rectangle’s origin and draw it. Suppose, though, that you wanted to change the origin of a complex path that incorporated dozens of points and several Bezier curves with their associated control points. How easy would it be to recalculate the position of each point in that path? It would probably take a lot of time and require some pretty sophisticated calculations. Enter transforms. A transform is two-dimensional mathematical array used to map points from one coordinate space to another. Using transforms, you can scale, rotate, and translate content freely in two-dimensional space using only a few methods and undo your changes just as quickly. Support for transformsin Cocoa is provided by the NSAffineTransform class. The following sections provide background information about transforms and their effects. For additional information about how to use transforms in your code, see “Using Transforms in Your Code” (page 51). The Identity Transform The simplest type of transform is the identity transform. An identity transform maps any point to itself—that is, it does not transform the point at all. You always start with an identity transform and add transformations to it. Starting with the identity transform guarantees that you start from a known state. To create an identity transform, you would use the following code: Coordinate Systems and Transforms Transform Basics 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 45NSAffineTransform* identityXform = [NSAffineTransform transform]; Transformation Operations For two-dimensional drawing, you can transform content in several different ways, including translating,scaling, and rotating. Transforms modify the coordinate system for the current drawing environment and affect all subsequent drawing operations. Before applying a transform, it is recommended that you save the current graphics state. The following sections describe each type of transformation and how it affects rendered content. Translation Translation involvesshifting the origin of the current coordinate system horizontally and vertically by a specific amount. Translation is probably used the most because it can be used to position graphic elements in the current view. For example, if you create a path whose starting point is always (0, 0), you could use a translation transform to move that path around your view, as shown in Figure 3-2. Figure 3-2 Translating content To translate content, use the translateXBy:yBy: method of NSAffineTransform. The following example changes the origin of the current context from (0, 0) to (50, 20) in the view's coordinate space: NSAffineTransform* xform = [NSAffineTransform transform]; [xform translateXBy:50.0 yBy:20.0]; [xform concat]; Coordinate Systems and Transforms Transform Basics 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 46Scaling Scaling lets you stretch or shrink the units of the user space along the x and y axes independently. Normally, one unit in user space is equal to 1/72 of an inch. If you multiple the scale of either axis by 2, one unit on that axis becomes equal to 2/72 of an inch. This makes content drawn with scale factors greater than 1 appear magnified and content drawn with scale factors less than 1 appear shrunken. Figure 3-3 shows the effects of scaling on content. In the figure, a translation transform has already been applied so that the origin is located at (1, 1) in the original user space coordinate system. After applying the scaling transform, you can see the modified coordinate system and how it maps to the original coordinate system. Figure 3-3 Scaling content Although you might normally scale proportionally by applying the same scale factor to both the horizontal and vertical axes, you can assign different scale factors to each axis to create a stretched or distorted image. To scale content proportionally, use the scaleBy: method of NSAffineTransform. To scale content differently along the X and Y axes, use the scaleXBy:yBy: method. The following example demonstrates the scale factors shown in Figure 3-3: NSAffineTransform* xform = [NSAffineTransform transform]; [xform scaleXBy:2.0 yBy:1.5]; [xform concat]; Coordinate Systems and Transforms Transform Basics 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 47Note: Scaling does not change the origin of the coordinate system. Rotation Rotation changes the orientation of the coordinate axes by rotating them around the current origin, as shown in Figure 3-4. You can change the orientation through a full circle of motion. Figure 3-4 Rotated content To rotate content, use the rotateByDegrees: or rotateByRadians: methods of NSAffineTransform. Positive rotation values proceed counterclockwise around the current origin. For example, to rotate the current coordinate system 45 degrees around the current origin point (as shown in Figure 3-4), you would use the following code: NSAffineTransform* xform = [NSAffineTransform transform]; [xform rotateByDegrees:45]; [xform concat]; Note: Combining a non-uniform scaling transform with a rotation transform can also give your content a skewed effect. Transformation Ordering The implementation of transforms uses matrix multiplication to map an incoming coordinate point to a modified coordinate space. Although the mathematics of matrices are covered in “Transform Mathematics” (page 50), an important factor to note is that matrix multiplication is not always a commutative operation—that is, a times b does not always equal b times a. Therefore, the order in which you apply transforms is often crucial to achieving the desired results. Coordinate Systems and Transforms Transform Basics 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 48Figure 3-5 shows the two transformations applied to a path in two different ways. In the top part of the figure, the content is translated by 60 points along the X axis and then rotated 45 degrees. In the bottom part of the figure, the exact same transformations are reversed with the rotation preceding the translation. The end result is two different coordinate systems. Figure 3-5 Transform ordering The preceding figure demonstrates the key aspect of transformation ordering. Each successive transformation is applied to the coordinate system created by the previous transformations. When you translate and then rotate, the rotation begins around the origin of the translated coordinate system. Similarly, when you rotate and then translate, the translation occurs along the axes of the rotated coordinate system. For transformations of the same type, the order of the transformations does not matter. For example, three rotationsin a row creates a coordinate system whose final rotation is equal to the finalsum of the three rotation angles. There may be other cases (such as scaling by 1.0) where the order of the transforms does not matter, but you should generally assume that order is significant. Coordinate Systems and Transforms Transform Basics 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 49Transform Mathematics All transform operations contribute to the building of a mathematical matrix that is then used by the graphics system to compute the screen location of individual points. The NSAffineTransform class uses a 3 x 3 matrix to store the transform values. Figure 3-6 showsthis matrix and identifiesthe key factors used to apply transforms. The m11 , m12 , m21 , and m22 values control both the scaling and rotation factors while t x and t y control translation. Figure 3-6 Basic transformation matrix Using linear algebra, it is possible to multiply a coordinate vector through the transform matrix to obtain a new coordinate vector whose position is equal to the original point in the new coordinate system. Figure 3-7 shows the matrix multiplication process and the resulting linear equations. Figure 3-7 Mathematical conversion of coordinates Coordinate Systems and Transforms Transform Basics 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 50If you are already familiar with transform structures and the mathematics, you can set the values of a transform matrix directly using the setTransformStruct: method of NSAffineTransform. This method replaces the six key transform values with the new ones you specify. Replacing all of the values at once is much faster than applying individual transformations one at a time. It does require you to precompute the matrix values, however. Formore information aboutthemathematics behindmatrixmultiplications,seeQuartz 2DProgrammingGuide . Using Transforms in Your Code When it is time to draw, the code in your view’s drawRect: method must determine where to draw individual pieces of content. The position of some elements, such as images and rectangles, can be specified easily, but for complex elements like paths, transforms are an easy way to change the current drawing location. Creating and Applying a Transform To create a new transform object, call the transform class method of NSAffineTransform. The returned transform object is set to the identity transform automatically. After you have added all of the desired transformations to the transform object, you call the concat method to apply them to the current context. Calling concat adds your transformations to the CTM of the current graphics context. The modifications stay in effect until you explicitly undo them, as described in “Undoing a Transformation” (page 52), or a previous graphics state is restored. The following example creates a new transform object and adds several transformations to it. NSAffineTransform* xform = [NSAffineTransform transform]; // Add the transformations [xform translateXBy:50.0 yBy:20.0]; [xform rotateByDegrees:90.0]; // counterclockwise rotation [xform scaleXBy:1.0 yBy:2.0]; // Apply the changes [xform concat]; Coordinate Systems and Transforms Using Transforms in Your Code 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 51Undoing a Transformation Once applied, a transform affects all subsequent drawing calls in the current context. To undo a set of transformations, you can either restore a previous graphicsstate or apply an inverse transform. Both techniques have their advantages and disadvantages, so you should choose a technique based on your needs and the available information. Restoring a previous graphics state is the simplest way to undo a transformation but has other side effects. In addition to undoing the transform, restoring the graphicsstate reverts all other attributesin the current drawing environment back to their previous state. If you want to undo only the current transformation, you can add an inverse transform to the CTM. An inverse transform negates the effects of a given set of transformations using a complementary set of transformations. To create an inverse transform object, you use the invert method of the desired transform object. You then apply this modified transform object to the current context, as shown in the following example: NSAffineTransform* xform = [NSAffineTransform transform]; // Add the transformations [xform translateXBy:50.0 yBy:20.0]; [xform rotateByDegrees:90.0]; // counterclockwise rotation [xform concat]; // Draw content... // Remove the transformations by applying the inverse transform. [xform invert]; [xform concat]; You might use this latter technique to draw multiple items using the same drawing attributes but at different positions in your view. Depending on the type of transformations you use, you might also be able to do incremental transformations. For example, if you are calling translateXBy:yBy: only to reposition the origin, you could move the origin incrementally for each successive item. The following example, shows how you might position one item at (10, 10) and the next at (15, 10): [NSAffineTransform* xform = [NSAffineTransform transform]; // Draw item 1 [xform translateXBy:10.0 yBy:10.0]; Coordinate Systems and Transforms Using Transforms in Your Code 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 52[xform concat]; [item1 draw]; //Draw item 2 [xform translateXBy:5.0 yBy:0.0]; // Translate relative to the previous element. [xform concat]; [item2 draw]; Remember that the preceding techniques are used in cases where you do not want to modify your original items directly. Cocoa provides ways to modify geometric coordinates without modifying the current transformation matrix. For more information, see “Transforming Coordinates” (page 53). It is also worth noting that the effectiveness of an inverse transform is limited by mathematical precision. For rotation transforms, which involve taking sines and cosines of the desired rotation angle, an inverse transform may not be precise enough to undo the original rotation completely. In such a situation, you may want to simply save and restore the graphics state to undo the transform. Transforming Coordinates If you do not want to change the coordinate system of the current drawing environment, but do want to change the position or orientation of a single object, you have several options. The NSAffineTransform classincludesthe transformPoint: and transformSize: methodsfor changing coordinate values directly. Using these methods does not change the CTM of the current graphics context. If you want to alter the coordinates in a path, you can do so using the transformBezierPath: method of NSAffineTransform. This method returns a transformed copy of the specified Bezier path object. This method differs slightly from the transformUsingAffineTransform: method of NSBezierPath, which modifies the original object. Converting from Window to View Coordinates Events sent to your view by the operating system are sent using the coordinate system of the window. Before your view can use any coordinate values included with the event, it must convert those coordinates to its own local coordinate space. The NSView class provides several functions to facilitate the conversion of NSPoint, NSSize, and NSRect structures. Among these methods are convertPoint:fromView: and convertPoint:toView:, which convert pointsto and from the view’slocal coordinate system. For a complete list of conversion methods, see NSView Class Reference . Coordinate Systems and Transforms Using Transforms in Your Code 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 53Important: Cocoa event objects return y coordinate values that are 1-based (in window coordinates) instead of 0-based. Thus, a mouse click on the bottom left corner of a window or view would yield the point (0, 1) in Cocoa and not (0, 0). Only y-coordinates are 1-based. The following example converts the mouse location of a mouse event from window coordinates to the coordinates of the local view. To convert to the view’s local coordinate space, you use the convertPoint:fromView: method. The second parameter to this method specifies the view in whose coordinate system the point is currently specified. Specifying nil for the second parameter tells the current view to convert the point from the window’s coordinate system. NSPoint mouseLoc = [theView convertPoint:[theEvent locationInWindow] fromView:nil]; Coordinate Systems and Transforms Using Transforms in Your Code 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 54Flipped Coordinate Systems One topic that comes up frequently in Cocoa and Quartz is the use of flipped coordinate systems for drawing. By default, Cocoa uses a standard Cartesian coordinate system, where positive values extend up and to the right of the origin. It is possible, however, to “flip” the coordinate system, so that positive values extend down and to the right of the origin and the origin itself is positioned in the top-left corner of the current view or window, as shown in Figure 3-8. Figure 3-8 Normal and flipped coordinate axes Flipping the coordinate system can make drawing easier in some situations. Text systems in particular use flipped coordinates to simplify the placement of text lines, which flow from top to bottom in most writing systems. Although you are encouraged to use the standard Cartesian (unflipped) coordinate system whenever possible, you can use flipped coordinates if doing so is easier to support in your code. Configuring a view to use flipped coordinates affects only the content you draw directly in that view. Flipped coordinate systems are not inherited by child views. The content you draw in a view, however, must be oriented correctly based on the current orientation of the view. Failing to take into account the current view orientation may result in incorrectly positioned content or content that is upside down. Coordinate Systems and Transforms Flipped Coordinate Systems 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 55The following sections provide information about Cocoa support for flipped coordinates and some of the issues you may encounter when using flipped coordinate systems. Wherever possible, these sections also offer guidance on how to solve issues that arise due to flipped coordinate systems. Configuring Your View to Use Flipped Coordinates The first step you need to take to implement flipped coordinates is to decide the default orientation of your view. If you prefer to use flipped coordinates, there are two ways to configure your view’s coordinate system prior to drawing: ● Override your view’s isFlipped method and return YES. ● Apply a flip transform to your content immediately prior to rendering. If you plan to draw all of your view’s content using flipped coordinates, overriding the view’s isFlipped method is by far the preferred option. Overriding this method lets Cocoa know that your view wants to use flipped coordinates by default. When a view’s isFlipped method returns YES, Cocoa automatically makes several adjustments for you. The most noticeable change is that Cocoa adds the appropriate conversion transform to the CTM before calling your view’s drawRect: method. This behavior eliminates the need for your drawing code to apply a flip transform manually. In addition, many Cocoa objects automatically adjust their drawing code to account for the coordinate system of the current view. For example, the NSFont object automatically takes the orientation of the coordinate system into account when setting the current font. This prevents text from appearing upside down when drawn in your view. If you draw only a subset of your view’s content using flipped coordinates, you can use a flip transform (instead of overriding isFlipped) to modify the coordinate system manually. A flip transform lets you adjust the current coordinate system temporarily and then undo that adjustment when it is no longer needed. You would apply thistransform to your view’s coordinate system immediately prior to drawing the relevant flipped content. For information on how to create a flip transform, see “Creating a Flip Transform” (page 59). Drawing Content in a Flipped Coordinate System Most of the work you do to support flipped coordinates occurs within your application’s drawing code. If you chose to use flipped coordinates in a particular view, chances are it was because it made your drawing code easier to implement. Drawing in a flipped coordinate system requires you to position elements differently relative to the screen but is otherwise fairly straightforward. The following sections provide some tips to help you ensure any rendered content appears the way you want it. Coordinate Systems and Transforms Flipped Coordinate Systems 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 56Drawing Shape Primitives There are no real issues with drawing shape primitives in flipped coordinate systems. Shape primitives, such as rectangles, ovals, arcs, and Bezier curves can be drawn just as easily in flipped or unflipped coordinate systems. The only differences between the two coordinate systems is where the shapes are positioned and their vertical orientation. Laying out your shapes in advance to determine their coordinate points should solve any orientation issues you encounter. Drawing With Application Kit Functions The Application Kit framework contains numerousfunctionsfor quickly drawing specific content. Among these functions are NSRectFill, NSFrameRect, NSDrawGroove, NSDrawLightBezel, and so on. When drawing with these functions, Cocoa takesinto account the orientation of the target view. Thus, if your view usesflipped coordinates, these functions continue to render correctly in that flipped coordinate space. Drawing Images When rendering images in your custom views, you must pay attention to the relative orientation of your view and any images you draw in that view. If you draw an image in a flipped view using the drawInRect:fromRect:operation:fraction: method, your image would appear upside down in your view. You could fix this problem using one of several techniques: ● You could apply a flip transform immediately prior to drawing the image; see “Creating a Flip Transform” (page 59). ● You could use one of the compositeToPoint methods of NSImage to do the drawing. ● You could invert the image data itself. (Although a suitable fix, this is usually not very practical.) Using a flip transform to negate the effects of a flipped view ensures that your image contents are rendered correctly in all cases. This technique retains any previous transformations to the coordinate system, including scales and rotations, but removes the inversion caused by the view being flipped. You should especially use thistechnique if you needed to draw your image using the drawInRect:fromRect:operation:fraction: method of NSImage. This method lets you scale your image to fit the destination rectangle and is one of the more commonly used drawing methods for images. Although the compositeToPoint methods of NSImage provide you with a way to orient images properly without a flip transform, their use is not recommended. There are some side effects that make drawing with these methods more complicated. The compositeToPoint methods work by removing any custom scaling or rotation factors that you applied to the CTM. These methods also remove any scaling (but not translations) applied by any flip transforms, whether the transform was supplied by you or by Cocoa. (The methods also do not remove the scale factor in effect from resolution independence.) Any custom translation factors you applied Coordinate Systems and Transforms Flipped Coordinate Systems 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 57to the CTM are retained, however. Although this behavior is designed to ensure that images are not clipped by your view’s bounding rectangle, if you do not compensate for the flip transform’stranslation factor, clipping may still occur. Figure 3-9 shows what happens when you render an image in an unflipped view, and then in a flipped view, using the compositeToPoint:fromRect:operation: method. In the unflipped view, the image renders as expected at the specified point in the view. In the flipped view, the scale factor for the y-axis is removed but the translation factor is not, which results in the image being clipped because it appears partially outside the view’s visible bounds. To compensate, you would need to adjust the y-origin of the image by subtracting the original value from the view height to get the adjusted position. Figure 3-9 Compositing an image to a flipped view The issues related to the drawing of images in a flipped coordinate system are essentially independent of how you create those images in the first place. Images use a separate coordinate system internally to orient the image data. Whether you load the image data from an existing file or create the image by locking focus on it, Coordinate Systems and Transforms Flipped Coordinate Systems 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 58once the image data is loaded or you unlock focus, the image data is set. At that point, you must choose the appropriate drawing method or adjust the coordinate system yourself prior to drawing to correct for flipped orientation issues. Important: Although the setFlipped: method of NSImage might seem like a good way to change the orientation of an image after the fact, that is not actually the case. The setFlipped: method is there to let you specify the orientation of the image data before you issue a lockFocus call and draw into the image. Using that method to correct for flipped coordinate systems during drawing might seem to work at times, but it is not a reliable way to flip images and its use in that capacity is highly discouraged. For more information about images and their internal coordinate systems,see “Image Coordinate Systems” (page 81). Important: Regardless of whether the contents of the image are flipped or unflipped, you always specify the location and size of the image using the coordinate system of the current context. Drawing Text The text rendering facilities in Cocoa take their cues for text orientation from the current view. If your view’s isFlipped method returns YES, Cocoa automatically inverts the text drawn in that view to compensate for its flipped coordinate system. If you apply a flip transform manually from your drawing code, however, Cocoa does not know to compensate when drawing text. Any text you render after applying a flip transform manually therefore appears upside down in your view. These rules apply whether you are using the Cocoa text system or the drawing facilities of NSString to draw your text. If you lock focus on an image and draw some text into it, Cocoa uses the internal coordinate system of the NSImage object to determine the correct orientation for the text. As with other image content, if you subsequently render the image in a flipped view, the text you drew is flipped along with the rest of the image data. For more information about working with text, see “Text” (page 127). Creating a Flip Transform If you want to flip the coordinate system of your view temporarily, you can create a flip transform and apply it to the current graphics context. A flip transform is an NSAffineTransform object configured with two transformations: a scale transformation and a translate transformation. The flip transform works by flipping the direction of the y axis (using the scale transformation) and then translating the origin to the top of the view. Coordinate Systems and Transforms Flipped Coordinate Systems 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 59Listing 3-1 shows a drawRect: method that creates a flip transform and applies it to the current context. The flip transform shown here translatesthe origin first before reversing the direction of the vertical axis. You could also implement this transform by reversing the vertical axis first and then translating the origin in the negative direction—that is, using the negated value of the frame height. Listing 3-1 Flipping the coordinate system manually - (void)drawRect:(NSRect)rect { NSRect frameRect = [self bounds]; NSAffineTransform* xform = [NSAffineTransform transform]; [xform translateXBy:0.0 yBy:frameRect.size.height]; [xform scaleXBy:1.0 yBy:-1.0]; [xform concat]; // Draw flipped content. } The flip transform merely toggles the orientation of the current coordinate system. If your view already draws using flipped coordinates, because its isFlipped method returns YES, applying a flip transform reverts the coordinate system back to the standard orientation. Cocoa Use of Flipped Coordinates Some Cocoa classes inherently support flipped coordinates and some do not. If you are using unmodified Cocoa views and controls in your user interface, it should not matter to your code whether those views and controls use flipped coordinates. If you are subclassing, however, it isimportant to know the coordinate system orientation. The following controls and views currently use flipped coordinates by default: ● NSButton ● NSMatrix ● NSProgressIndicator ● NSScrollView ● NSSlider ● NSSplitView ● NSTabView ● NSTableHeaderView Coordinate Systems and Transforms Flipped Coordinate Systems 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 60● NSTableView ● NSTextField ● NSTextView Some Cocoa classes support flipped coordinates but do not use them all the time. The following list includes the known cases where flipped-coordinate support depends on other mitigating factors. ● Images do not use flipped coordinates by default; however, you can flip the image’s internal coordinate system manually using the setFlipped: method of NSImage. All representations of an NSImage object use the same orientation. For more information about images and flipped coordinates, see “Image Coordinate Systems” (page 81). ● The Cocoa text system takes cues from the current context to determine whether text should be flipped. If the text is to be displayed in an NSTextView object, text system objects (such as NSFont) also uses flipped coordinates to ensure that text is rendered right-side up. If you are drawing text in a custom view that uses standard coordinate, the text system objects do not use flipped coordinates. ● An NSClipView object determines whether to use flipped coordinates by looking at the coordinate system of its document view. If the document view uses flipped coordinates, so does the clip view. Using the same coordinate system ensures that the scroll origin matches the bounds origin of the document view. ● Graphics convenience functions,such asthose declared in NSGraphics.h, take flipped coordinate systems into account when drawing. For information about the available graphics convenience functions, see Application Kit Functions Reference . As new controls and views are introduced in Cocoa, those objects may also support flipped coordinates. Check the class reference documentation for any subclassing notes on whether a class supports flipped coordinates. You can also invoke the view’s isFlipped method at runtime to determine if it uses flipped coordinates. Doing Pixel-Exact Drawing Although it is possible to create applications using only the views, controls, and images provided by Cocoa, it is common for applications to use one or more custom views or images. And although Cocoa provides default behavior for laying out custom content, there are many times when you may want to adjust the position of individual views or imagesto avoid visual artifacts. Thisis especially true when tiling or drawing bitmap images on high-resolution devices(such as printers) or devices where resolution independentscale factors are in effect. The following sections provide guidelines and practical advice for how to prevent visual artifactsthat can occur during high-resolution drawing. For additional information on resolution independence and how to adapt your code to support different scale factors, see High Resolution Guidelines for OS X . Coordinate Systems and Transforms Doing Pixel-Exact Drawing 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 61Tips for Resolution Independent Drawing in Cocoa Cocoa applications provide a tremendous amount ofsupport for rendering to high-resolution devices. Although much of this support is automatic, you still need to do some work to ensure your content looks good. The following list includes some approaches to take when designing your interface: ● Use high-resolution images. ● During layout, make sure views and images are positioned on integral pixel boundaries. ● When creating tiled background images for custom controls, use the NSDrawThreePartImage and NSDrawNinePartImage methods to draw your background rather than trying to draw it yourself. ● Use antialiased text rendering modes for non-integral scale factors and be sure to lay out your text views on pixel boundaries. ● Test your applications with non-integral scale factors such as 1.25 and 1.5. These factors tend to generate odd numbers of pixels, which can reveal potential pixel cracks. If you are using OpenGL for drawing, you should also be aware that in OS X v10.5, the bounding rectangle of a view drawn into an NSOpenGLContext is measured in pixels and not in points (as it is in non OpenGL situations). This support may change in the future, however, so OpenGL developers should be sure to convert coordinates directly using the coordinate conversion methods of NSView. For example, the following conversion code for a view object is guaranteed to return the correct values needed by OpenGL. NSSize boundsInPixelUnits = [self convertRect:[self bounds] toView:nil]; glViewport(0, 0, boundsInPixelUnits.size.width, boundsInPixelUnits.size.height); For more information about resolution independence and how it affectsrendered content,see High Resolution Guidelines for OS X . Accessing the Current Scale Factor Knowing the current scale factor can help you make decisions about how best to render your content. The NSWindow and NSScreen classes both include a userSpaceScaleFactor method that you can call to obtain the current scale factor, if any, for your application. In OS X v10.5 and earlier, this method usually returns 1.0, indicating that the user space and device space have the same resolution (where one point equals one pixel). At some point though, this method may return a value that is greater than 1.0. For example, a value of 1.25 would indicate a screen resolution of approximately 90 dpi, while a value of 2.0 would indicate a screen resolution of 144 dpi. Coordinate Systems and Transforms Doing Pixel-Exact Drawing 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 62If you want to know the actual resolution of a particularscreen, the NSScreen classincludesinformation about the display resolution in its device description dictionary (accessed using the deviceDescription method). You can use this information (instead of multiplying scale factors) to determine the appropriate resolution to use for your images. Adjusting the Layout of Your Content Because screens are relatively low-resolution devices, drawing glitches are often more noticeable on a screen than they are on higher-resolution devices such as printers. Drawing glitches can occur when you render content in a way that requirestweaking to match the underlying pixelssent to the screen. For example, images and shapes drawn on non-pixel boundaries might require aliasing and therefore might appear less crisp than those drawn exactly on pixel boundaries. In addition, scaling an image to fit into a different-sized area requires interpolation, which can introduce artifacts and graininess. Although pixel-alignment issues can occur on any version of OS X, they are more likely to occur asthe operating system changes to support resolution independence. Under resolution independence, units in the user coordinate space and device coordinate space are no longer required to maintain a one-to-one relationship. For high-resolution screens, this means that a single unit in user space may be backed by multiple pixels in device space. So even if your user-space coordinatesfall on integral unit boundaries, they may still be misaligned in device space. The presence of extra pixels can also lead to pixel cracks, which occur when misaligned shapes leave small gaps because they do not fill the intended drawing area entirely. If your images or shapes are not drawing the way you expect, or if your graphics content displays evidence of pixel cracks, you can remove many of these issues by adjusting the coordinate values you use to draw your content. The following steps are not required if the current scale factor is 1.0 but would be required for other scale factors. 1. Convert the user-space point, size, or rectangle value to device space coordinates. 2. Normalize the value in device space so that it is aligned to the appropriate pixel boundary. 3. Convert the normalized value back to user space. 4. Draw your content using the adjusted value. The best way to get the correct device-space rectangle is to use the centerScanRect: method of NSView. This method takes a rectangle in userspace coordinates, performsthe needed calculationsto adjust the position of rectangles based on the current scale factor and device, and returns the resulting user space rectangle. For layout, you can also use the methods described in “Converting Coordinate Values” (page 64). If you want more control over the precise layout of items in device space, you can also adjust coordinates yourself. OS X provides several functions for normalizing coordinate values once they are in device space, including the NSIntegralRect and CGRectIntegral functions. You can also use the ceil and floor functions in math.h to round device space coordinates up or down as needed. Coordinate Systems and Transforms Doing Pixel-Exact Drawing 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 63Converting Coordinate Values In OS X v10.5, several methods were added to NSView to simplify the conversion between user space and device space coordinates: ● convertPointToBase: ● convertSizeToBase: ● convertRectToBase: ● convertPointFromBase: ● convertSizeFromBase: ● convertRectFromBase: These convenience methods make it possible to convert values to and from the base (device) coordinate system. They take into account the current backing store configuration for the view, including whether it is backed by a layer. To change the coordinate values of an NSPoint structure, the beginning of your view’s drawRect: method might have code similar to the following: - (void)drawRect:(NSRect)rect { NSPoint myPoint = NSMakePoint(1.0, 2.0); CGFloat scaleFactor = [[self window] userSpaceScaleFactor]; if (scaleFactor != 1.0) { NSPoint tempPoint = [self convertPointToBase:myPoint]; tempPoint.x = floor(tempPoint.x); tempPoint.y = floor(tempPoint.y); myPoint = [self convertPointFromBase:tempPoint]; } // Draw the content at myPoint } It is up to you to determine which normalization function is best suited for your drawing code. The preceding example uses the floor function to normalize the origin of the given shape but you might use a combination of floor and ceil depending on the position of other content in your view. Coordinate Systems and Transforms Doing Pixel-Exact Drawing 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 64One of the keys to creating interesting graphics is the effective use of color and transparency. In OS X, both are used to convey information and provide an inherent appeal to your creations. Good color usage usually results in an interface that is pleasing to the user and helps call out information when it is needed. About Color and Transparency Support for color in Cocoa is built on top of Quartz. The NSColor class provides the interface for creating and manipulating colors in a variety of color spaces. Other classes provide color and color space management. Cocoa also provides classes that present a user interface for selecting colors. For a more thorough explanation of color, color theory, and color management in OS X,see Color Management Overview and Color Programming Topics. Color Models and Color Spaces The human eye perceives photons in a fairly narrow band of the electromagnetic spectrum. Each photon vibrates at a frequency that defines the color of the light represented by that photon. The biology of the eye makes it particularly receptive to red, blue, and green light and these primary colors are often mixed together to create a broad range of perceptible colors. A color model is a geometric or mathematical framework that attempts to describe the colors seen by the eye. Each model contains one or more dimensions, which together represent the visible spectrum of color. Numerical values are pinned to each dimension making it possible to describe colors in the color model numerically. Having a numerical representation makes it possible to describe, classify, compare, and order those colors. A color space is a practical adaptation of a color model. It specifies the gamut (or range) of colors that can be produced using a particular color model. While the color model determines the relationship between values in each dimension, the color space defines the absolute meaning of those values as colors. Cocoa supports the same color spaces as Quartz 2D, although accessor methods of NSColor focus on the following color spaces: ● RGB ● CMYK ● Gray 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 65 Color and TransparencyIn Cocoa, the NSColorSpace class handles the information associated with a particular color space. You can create instances of this class to represent individual color spaces. Cocoa provides methods for retrieving color space objects representing the standard color spaces. You can also create custom color space objects using a ColorSync profile reference or International Color Consortium (ICC) profile data. For detailed information about color spaces and color models in OS X, see Color Management Overview. Color Objects The NSColor class in Cocoa provides the interface you need to create and manage individual colors. The NSColor classisitself a factory classfor creating the actual color objects. The class methods of NSColor create color objects that are actually based on specific subclasses of NSColor, where each subclass implements the behavior for a specific color space. Because a color object must represent a single color space, you cannot use all of the methods of NSColor from the same object. For a given color object, you can use only the methods that are relevant to colors in that object’s color space. For example, if you create an CMYK-based color object, you cannot use the getRed:green:blue:alpha: method to retrieve RGB values. Methods that are unsupported in the current color space raise an exception. For more information on how to create and use colors, see “Creating Colors” (page 68). Color Component Values In Cocoa, color space values, called components, are specified as floating-point values in the range 0.0 to 1.0. When working with other color values from other systems, you must convert any values that do not fall into the supported range. For example, if you use a color system whose components have values in the range 0 to 255, you must divide each component value by 255 to get the appropriate value for Cocoa. You can retrieve the component values of a color object using any of several methods in NSColor. Several methods exist for retrieving the color values of known color spaces, such as RGB, CMYK, HSV (also known as HSB), and gray. If you do not know the number of components in the color’s color space, you can use the numberOfComponents method to find out. You can then use the getComponents: method to retrieve the component values. Transparency In addition to the component values used to identify a particular color in a colorspace, OS X colors also support an alpha component for identifying the transparency of that color. Color and Transparency About Color and Transparency 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 66Transparency is a powerful effect used to give the illusion of light passing through a particular area instead of reflecting off of it. When you render an object using a partially transparent color, the object picks up some color from the object directly underneath it. The amount of color it picks up depends on the value of the color’s alpha component and the compositing mode. Like color components, the alpha component is specified as a floating-point value in the range 0.0 to 1.0. You can think of the alpha component as specifying the amount of light being reflected back from the object’s surface. An alpha value of 1.0 represents a 100% reflection of all light and is equivalent to the object being opaque. An alpha value of 0.0 represents 0% reflection of light and all color coming from the content underneath. An alpha value of 0.5 represents 50% reflection, with half the color being reflected off the object and half coming from the content underneath. You specify transparency when you create a color object. If you create a color using component values, you can specify an alpha value directly. If you have an existing color object, you can use the colorWithAlphaComponent: method to create a new color object with the same color components as the original but with the alpha value you specify. Pattern Colors In addition to creating monochromatic colors, you can also create pattern colors using images. Pattern colors are most applicable asfill colors but can be used asstroke colors as well. When rendered, the image you specify is drawn on the path or its fill area instead of a solid color. If an image is too small to fill the given area, it is tiled vertically and horizontally, as shown in Figure 4-1. Figure 4-1 Drawing with a pattern For information on how to create pattern colors, see “Creating Colors” (page 68). Color and Transparency About Color and Transparency 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 67Color Lists A color list is a dictionary-like object (implemented by the NSColorList class) that contains an ordered list of NSColor objects, identified by keys. You can retrieve colors from the color list by key. You can also organize the colors by placing them at specific indexes in the list. Color lists are available as a tool to help you manage any document-specific colors. They are also used to customize the list of colors displayed in a color panel. You can use the attachColorList: method of NSColorPanel to add any colors your application uses to the panel. For more information about using color lists and color panels, see Color Programming Topics. Color Matching Cocoa provides automatic color matching whenever possible using ColorSync. Color matching ensures that the colors you use to draw your content look the same on different devices. Cocoa provides full support for creating and getting color profile information using the NSColorSpace class. Cocoa supports both ColorSync profile references and ICC profiles as well as calibrated and device-specific profiles for the RGB, CMYK, and gray color spaces. Because color matching is automatic, there is nothing to do in your code except use the colors you want. For information about ColorSync, see ColorSync Manager Reference . For information on ICC profiles, see the International Color Consortium website: http://www.color.org/. Creating Colors The NSColor class supports the creation of several different types of color objects: ● Commonly used colors, such as red, green, black, or white ● System colors,such asthe current control color or highlight color, whose values are set by user preferences ● Calibrated colors belonging to a designated color space ● Device colors belonging to the designated device color space ● Pattern colors To create most color objects, simply use the appropriate class method of NSColor. The class defines methods for creating preset colors or for creating colors with the values you specify. To create a pattern color, load or create the desired image and pass it to the colorWithPatternImage: method of NSColor. For more information, see the NSColor class reference. For information on how to load and create images, see “Images” (page 74). Color and Transparency Creating Colors 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 68Important: Never allocate and initialize an NSColor object directly. Because it is a base class, the implementation of NSColor is minimal and simply throws an exception in situations where actual color information is required. In OS X v10.5 and later, Cocoa provides support for gradient fill patterns through the NSGradient class. Prior to version 10.5, if you want to use a gradient to fill or stroke a path, you must use Quartz instead. For examples of how to create and use gradients, see “Creating Gradient Fills” (page 113). Working with Colors Once you have an NSColor object, you can apply it to the stroke or fill color of the current context. Once set, any shapes you draw in the current context take on that color. You can also use the color component information in any calculations you might need for your program. Applying Colors to Drawn Content Stroke and fill colors modify the appearance of path-based shapes,such asthose drawn with the NSBezierPath class or functions such as NSRectFill. The stroke color applies to the path itself, and the fill color applies to the area bounded by that path. To set the current stroke or fill attributes, you use one of the NSColor methods listed in Table 4-1. Table 4-1 Methods for changing color attributes NSColor method Description set Sets both the stroke and fill color to the same value. setFill Sets the fill color. setStroke Sets the stroke color. For example, the following code sets the stroke color to black and the fill color to the background color for controls. [[NSColor blackColor] setStroke]; [[NSColor controlBackgroundColor] setFill]; Color and Transparency Working with Colors 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 69All subsequent drawing operations in the current context would use the specified colors. If you do not want any color to be drawn for the stroke or fill, you can set the current stroke or fill to a completely transparent color, which you can get by calling the clearColor method of NSColor. You can also create a transparent color by setting the alpha of any other color to 0. Note: Stroke and fill colors do not affect the appearance of text. To apply color to text, you must change the attributes associated with the text. Applying Color to Text Unlike many graphics operations, text is not drawn using the current stroke and fill colors. Instead, to apply color to text, you must apply color attributes to the characters of the corresponding string object. To apply color to a range of characters in an NSAttributedString object, you apply the NSForegroundColorAttributeName attribute to the characters. This attribute takes a corresponding NSColor object as its value. To apply color to the characters of an NSString object, you apply the NSForegroundColorAttributeName attribute just as you would for an NSAttributedString object. The difference in application isthat attributes applied to an NSString object affect the entire string and not a specified range of characters. The set of available attributesfor both string typesislisted in NSAttributedString Application Kit Additions Reference in the Application Kit Framework Reference . For an example of how to change the attributes of an attributed string, see “Changing an Attributed String” in Attributed String Programming Guide . For more information about drawing text, see “Text” (page 127). Getting the Components of a Color If your program manipulates colors in any way, you may want to know the component values for the colors you use. NSColor provides the following accessor methods for retrieving component values of a color: ● numberOfComponents ● getComponents: ● getRed:green:blue:alpha: ● getCyan:magenta:yellow:black:alpha: ● getHue:saturation:brightness:alpha: ● getWhite:alpha: Color and Transparency Working with Colors 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 70The NSColor class also provides methods for accessing individual component values, rather than all of the components together. For more information, see the NSColor class reference. Important: It is a programming error to ask an NSColor object for components that are not defined in the color space of its current color, and making such a request raises an exception. If you need a specific set of components, you should first convert the color to the appropriate color space using the colorUsingColorSpaceName: method. For more information, see “Converting Between Color Spaces” (page 71). Choosing Colors Applicationsthat need to present a color picker interface to the user can use either a color well or a color panel. A color well is a control that displays a single color. You can embed this control in your windows and use it to show a currently selected color. When clicked, a color well displays the system color panel, which provides an interface for picking a color. You can also use the color panel on its own to prompt the user for a color. For information about how to use color wells and the color panel in your application, see Color Programming Topics. Working with Color Spaces Colorspaces help your program maintain color fidelity throughout the creation and rendering process. Although most programs may never need to worry about color spaces, you might need to know the current color space in some situations, such as prior to manipulating color component values. Converting Between Color Spaces You can convert between color spaces using the colorUsingColorSpaceName: method of NSColor. This method creates a new color object representing the same color but using the color space you specify. To convert a color from RGB to CMYK, you could use code similar to the following: NSColor* rgbColor = [NSColor colorWithCalibratedRed:1.0 green: 0.5 blue: 0.5 alpha:0.75]; NSColor* cmykColor = [rgbColor colorUsingColorSpace:[NSColorSpace genericCMYKColorSpace]]; Color and Transparency Working with Color Spaces 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 71Mapping Physical Colors to a Color Space The range of colors (or gamut) that can be physically displayed on an output device differs from device to device. During rendering, Cocoa attempts to match the colors you specify in your code as closely as it can to the colors available in the target device. Sometimes, though, it maps colorsin a different way so asto emphasize different aspects of a color that might be more important when reproducing that color. The mapping used for colors is referred to as the rendering intent and it is something most developers rarely need to change. Because most developersshould not need to change the rendering intent, you cannotset the attribute directly from Cocoa. If your application needs more control over the color management, you must use Quartz to change the rendering intent. Table 4-2 lists the rendering intents supported by Quartz. Table 4-2 Quartz rendering intents Rendering intent Description Use the default rendering intent settings. In this mode, Quartz uses the relative colorimetric intent for all drawing except that ofsampled images; for sampled images, Quartz uses the perceptual rendering intent. kCGRenderingIntentDefault This rendering intent performs no white point adjustment to the colors. A color that appearsto be white on a screen display may be reproduced on a printed medium as a bluish color (because a white color on a screen actually has a bluish cast). This intent is useful for simulating one device on another or for rendering logos where exact color reproduction is important. kCGRenderingIntentAbsoluteColorimetric This rendering intent uses the white point information from the source and destination and adjusts the color information so that the white point of the source maps into the white point of the destination. In-gamut colors are also adjusted accordingly. This intent is typically used for line art graphics. kCGRenderingIntentRelativeColorimetric Thisrendering intent produces pleasing visual results and preservesthe relationship between colors at the expense of the absolute color reproduction. This intent is typically used for photographic images. kCGRenderingIntentPerceptual Thisrendering intent attemptsto maximize the saturation of colors. This intent is mostly used for business charts or graphics. kCGRenderingIntentSaturation To change the rendering intent, you must get a Quartz graphics context for the current drawing environment and call the CGContextSetRenderingIntent function, as shown in the following example: - (void) drawRect:(NSRect)rect Color and Transparency Working with Color Spaces 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 72{ CGContextRef theCG = [[NSGraphicsContext currentContext] graphicsPort]; // Change the rendering intent. CGContextSetRenderingIntent(theCG, kCGRenderingIntentPerceptual); // Draw your content. } Color and Transparency Working with Color Spaces 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 73Important: This chapter has not yet been updated to describe how images work in OS X v10.6. Significant changes were made to image processing in OS X v10.6. See Application Kit Release Notes (10.7 and Earlier) and High Resolution Guidelines for OS X for details. Images are an important part of any Mac app. In Cocoa, images play a very important, but flexible, role in your user interface. You can use imagesto render preexisting content or act as a buffer for your application's drawing commands. At the heart of Cocoa'simage manipulation code isthe NSImage class. This class manages everything related to image data and is used for the following tasks: ● Loading existing images from disk. ● Drawing image data into your views. ● Creating new images. ● Scaling and resizing images. ● Converting images to any of several different formats. You can use images in your program for a variety of tasks. You can load images from existing image files (such as JPEG, GIF, PDF, and EPS files) to draw elements of your user interface that might be too difficult (or too inefficient) to draw using primitive shapes. You can also use images as offscreen or temporary buffers and capture a sequence of drawing commands that you want to use at a later time. Although bitmaps are one of the most common types of image, it is important not to think of the NSImage class as simply managing photographic or bitmap data. The NSImage class in Cocoa is capable of displaying a variety of image types and formats. It provides support for photograph and bitmap data in many standard formats. It also provides support for vector, or command-based data, such as PDF, EPS, and PICT. You can even use the NSImage class to represent an image created with the Core Image framework. 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 74 ImagesImage Basics The NSImage class providesthe high-level interface for manipulating imagesin many different formats. Because it provides the high-level interface, NSImage knows almost nothing about managing the actual image data. Instead, the NSImage class manages one or more image representation objects—objects derived from the NSImageRep class. Each image representation object understands the image data for a particular format and is capable of rendering that data to the current context. The following sections provide insight into the relationship between image objects and image representations. Image Representations An image representation object represents an image at a specific size, using a specific color space, and in a specific data format. Image representations are used by an NSImage object to manage image data. An image representation object knows how to read image data from a file, write that data back to a file, and convert the image data to a raw bitmap that can then be rendered to the current context. Some image representations also provide an interface for manipulating the image data directly. For file-based images, NSImage creates an image representation object for each separate image stored in the file. Although most image formats support only a single image, formats such as TIFF allow multiple images to be stored. For example, a TIFF file might store both a full size version of an image and a thumbnail. If you are creating images dynamically, you are responsible for creating the image representation objects you need for your image. As with file-based images, most of the images you create need only a single image representation. Because NSImage is adept at scaling and adjusting images to fit the target canvas, it is usually not necessary to create different image representations at different resolutions. You might create multiple representations in the following situations, however: ● For printing, you might want to create a PDF representation or high-resolution bitmap of your image. ● You want to provide different content for your image when it is scaled to different sizes. When you draw an image, the NSImage object chooses the representation that is best suited for the target canvas. This choice is based on several factors, which are explained in “How an Image Representation Is Chosen” (page 77). If you want to ensure that a specific image representation is used, you can use the drawRepresentation:inRect: method of NSImage. Image Representation Classes Every image representation object is based on a subclass of NSImageRep. Cocoa defines several specific subclasses to handle commonly used formats. Table 5-1 lists the class and the image types it supports. Images Image Basics 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 75Table 5-1 Image representation classes Supported Description types Class Handles bitmap data. Several common bitmap formats are supported directly. For custom image formats, you may have to decode the image data yourself before creating your image representation. An NSBitmapImageRep object uses any available color profile data (ICC or ColorSync) when rendering. TIFF, BMP, JPEG, GIF, PNG, DIB, ICO, among others NSBitmapImageRep This classis used internally by Cocoa to cache imagesfor drawing to the screen. You should not need to use this class directly. NSCachedImageRep Rendered data Provides a representation for a CIImage object, which itself supports most bitmap formats. NSCIImageRep N/A NSPDFImageRep PDF Handles the display of PDF data. Handles the display of PostScript or encapsulated PostScript data. NSEPSImageRep EPS Handles custom image data by passing it to a delegate object you provide. NSCustomImageRep Custom Handles the display of PICT format version 1, version 2, and extended version 2 pictures. The PICT format is a legacy format described in the Carbon QuickDraw Manager documentation. NSPICTImageRep PICT In most situations, you do not need to know how an image representation is created. For example, if you load an existing image from a file, NSImage automatically determines which type of image representation to create based on the file data. All you have to do is draw the image in your view. If you want to support new image formats, you can create a new image representation class. The NSImage class and its NSImageRep subclasses do not follow the class cluster model found in several other Cocoa classes. Creating new image representations is relatively straightforward and is explained in “Creating New Image Representation Classes” (page 109). Images Image Basics 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 76How an Image Representation Is Chosen When you tell an NSImage object to draw itself, it searches its list of image representations for the one that best matches the attributes of the destination device. In determining which image representation to choose, it follows a set of ordered rules that compare the color space, image resolution, bit depth, and image size to the corresponding values in the destination device. The rules are applied in the following order: 1. Choose an image representation whose color space most closely matches the color space of the device. If the device is color, choose a color image representation. If the device is monochrome, choose a gray-scale image representation. 2. Choose an image representation that has at least as many pixels as the destination rectangle on both the horizontal and vertical axes. If no image representation matches exactly, choose the one that has more pixels than the destination. By default, any image representation with a resolution that’s an integer multiple of the device resolution is considered a match. If more than one representation matches, NSImage chooses the one that’s closest to the device resolution. You can force resolution matches to be exact by passing NO to the setMatchesOnMultipleResolution: method. You can force resolution matches to be exact on only one dimension by setting the setMatchesOnlyOnBestFittingAxis: property to YES. Thisrule prefers TIFF and bitmap representations, which have a defined resolution, over EPS representations, which do not. You can use the setUsesEPSOnResolutionMismatch: method to cause NSImage to choose an EPS representation in case a resolution match is not possible. 3. Choose a representation whose bit depth (bits per sample) matches the depth of the device. If no representation matches, choose the one with the highest number of bits per sample. You can change the order in which these rules are applied using the methods of NSImage. For example, if you want to invert the first and second rules, pass NO to the setPrefersColorMatch: method. Doing so causes NSImage to match the resolution before the color space. If these rules fail to narrow the choice to a single representation—for example, if the NSImage object has two color TIFF representations with the same resolution and depth—the chosen representation is operating-system dependent. Images and Caching The NSImage class incorporates an internal caching scheme aimed at improving your application’s drawing performance. This caching scheme is an important part of image management and is enabled by default for all image objects; however, you can change the caching optionsfor a particular image using the setCacheMode: method of NSImage. Table 5-2 lists the available caching modes. Images Image Basics 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 77Table 5-2 Image caching modes Mode Description Use the default caching mode appropriate for the image representation. This is the default value. For more information, see Table 5-3 (page 78). NSImageCacheDefault NSImageCacheAlways Always caches a version of the image. Creates a cached version of the image if the size set for the image issmaller than the size of the actual image data. NSImageCacheBySize Does not cache the image. The image data is rasterized every time it is drawn. NSImageCacheNever Table 5-3 liststhe behavior of each image representation when its cache mode isset to NSImageCacheDefault. Table 5-3 Implied cache settings Image representation Cache behavior Behaves as if the NSImageCacheBySize setting were in effect. Creates a cached copy if the bitmap depth does not match the screen depth or if the bitmap resolution is greater than 72 dpi. NSBitmapImageRep NSCachedImageRep Not applicable. This class is used to implement caching. Behaves as if the NSImageCacheBySize setting were in effect. Creates a cached copy if the bitmap depth does not match the screen depth or if the bitmap resolution is greater than 72 dpi. NSCIImageRep NSPDFImageRep Behaves as if the NSImageCacheAlways setting were in effect. NSEPSImageRep Behaves as if the NSImageCacheAlways setting were in effect. NSCustomImageRep Behaves as if the NSImageCacheAlways setting were in effect. Behaves as if the NSImageCacheBySize setting were in effect. Creates a cached copy of the PICT image if it contains a bitmap whose depth does not match the screen depth or if that bitmap resolution is greater than 72 dpi. NSPICTImageRep Caching is a useful step toward preparing an image for display on the screen. When first loaded, the data for an image representation may not be in a format that can be rendered directly to the screen. For example, PDF data, when loaded into a PDF image representation, must be rasterized before it can be sent to the graphics card for display. With caching enabled, a NSPDFImageRep object rasterizes the PDF data before drawing it to Images Image Basics 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 78the screen. The image representation then saves the raster data to alleviate the need to recreate it later. If you disable caching for such images, the rasterization process occurs each time you render the image, which can lead to a considerable performance penalty. For bitmap image representations, the decision to cache is dependent on the bitmap image data. If the bitmap’s colorspace, resolution, and bit depth match the corresponding attributesin the destination device, the bitmap may be used directly without any caching. If any of these attributes varies, however, the bitmap image representation may create a cached version instead. Important: It is important to remember that caching is aimed at improving performance during screen updates. During printing, Cocoa uses the native image data and resolution whenever possible and uses cached versions of the image only as a last resort. If you change the contents of an image representation object directly, you should invoke the recache method of the owning NSImage object when you are done and want the changes to be reflected on the screen. Cocoa does not automatically track the changes you make to your image representation objects. Instead, it continues to use the cached version of your image representation until you explicitly clear that cache using the recache method. Caching and Image Data Retention Because caching can lead to multiple copies of the image data in memory, NSImage usually dismisses the original image data once a cached copy is created. Dismissing the original image data saves memory and improves performance and is appropriate in situations where you do not plan on changing the image size or attributes. If you do plan on changing the image size or attributes, you may want to disable this behavior. Enabling data retention preventsimage degradation by basing changes on the original image data, as opposed to the currently cached copy. To retain image data for a specific image, you must send a setDataRetained: message to the NSImage object. Preferably, you should send this message immediately after creating the image object. If you send the message after rendering the image or locking focus on it, Cocoa may need to read the image data more than once. Caching Images Separately To improve performance, most caching of an application’s images occurs in one or more offscreen windows. These windows act as image repositories for the application and are not shared by other applications. Cocoa manages them automatically and assigns images to them based on the current image attributes. Images Image Basics 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 79By default, Cocoa tries to reduce the number of offscreen windows by putting multiple images into a single window. For images whose size does not change frequently, this technique is usually faster than storing each image in its own window. For images whose size does change frequently, it may be better to cache the image separately by sending a setCachedSeparately: message to the image object. Image Size and Resolution Both NSImage and NSImageRep define methods for getting and setting the size of an image. The meaning of sizes can differ for each type of object, however. For NSImage, the size is always specified in units of the user coordinate space. Thus, an image that is 72 by 72 points is always rendered in a 1-inch square. For NSImageRep, the size is generally tied to the size of the native or cached bitmap. For resolution-independent image representations, a cached bitmap is created whose size matches that returned by NSImage. For true bitmap images, however, the size is equal to the width and height (in pixels) of the bitmap image. If you create your image from a data object or file, the NSImage object takes its image size information from the provided data. For example, with EPS data, the size is taken from the bounding rectangle, whereas with TIFF data, the size is taken from the ImageLength and ImageWidth fields. If you create a blank image, you must set the image size yourself when you initialize the NSImage object. You can change the size of an image at any time using the setSize: method of either NSImage or NSImageRep. The size returned by the NSImage version of the method representsthe dimensions of the image in the user coordinate space. Changing this value therefore changes the size of the image as it is drawn in one of your views. This change typically affects only the cached copy of the image data, if one exists. Changing the size of an image representation object changes the actual number of bits used to hold the image data. This change primarily affects bitmap images, and can result in a loss of data for your in-memory copy of the image. If the size of the data in an image representation is smaller than the rectangle into which it will be rendered, the image must be scaled to fit the target rectangle. For resolution-independent images, such as PDF images, scaling is less of an issue. For bitmap images, however, pixel values in the bitmap must be interpolated to fill in the extra space. Table 5-4 lists the available interpolation settings. Table 5-4 Image interpolation constants Interpolation constant Description NSImageInterpolationDefault Use the context’s default interpolation. NSImageInterpolationNone No interpolation. NSImageInterpolationLow Fast, low-quality interpolation. NSImageInterpolationHigh Slower, higher-quality interpolation. Images Image Basics 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 80The preceding interpolation settings control both the quality and the speed of the interpolation algorithm. To change the currentinterpolation setting, use the setImageInterpolation:method of NSGraphicsContext. Note: Scaling affectsthe in-memory copy of image data only. It does not change data stored on-disk. With data retention disabled in an image, scaling the image multiple times can seriously degrade the resulting image quality. Making an image smaller through scaling is a lossy operation. If you subsequently make the image larger again by scaling, the results are based on the scaled-down version of the image. If you need several differentsizes of an image, you might want to create multiple image representation objects, one for each size, to avoid any lossy behavior. Alternatively, you can use the setDataRetained: method to ensure that the caching system has access to the original image data. Image Coordinate Systems Like views, NSImage objects use their own coordinate system to manage their content, which in this case is the image data itself. This internal coordinate system is independent of any containing views into which the image is drawn. Although you might think understanding this coordinate system is important for drawing images in your views, it actually is not. The purpose of the internal coordinate system is to orient the image data itself. As a result, the only time you should ever need to know about this internal coordinate system is when you create a new image by locking focus on an NSImage object and drawing into it. Image objects have two possible orientations: standard and flipped. When you create a new, empty NSImage object, you can set the orientation based on how you want to draw the image data. By default, images use the standard Cartesian (unflipped) coordinate system, but you can force them to use a flipped coordinate system by calling the setFlipped: method of NSImage prior to drawing. You must always set the image orientation before you lock focus on the image and start drawing though. Changing the orientation of the coordinate system after a lockFocus call has no effect. In addition, calling the setFlipped: method after you unlock focus again may not have the desired results and should be avoided. When drawing images in your view, you can think of the image as just a rectangle with some data in it. Regardless of the orientation of itsinternal coordinate system, you always place an image relative to the current view’s coordinate system. Figure 5-1 shows two images drawn in an unflipped view. The code used to draw Images Image Basics 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 81each image uses the coordinate points shown in the figure, which are in the view’s (unflipped) coordinate system. Because the first image uses a flipped coordinate system internally, however, it drawsits content upside down. Figure 5-1 Image orientation in an unflipped view Drawing Versus Compositing The NSImage class offers different groups of methods to facilitate drawing your images to the current context. The two main groups of methods can be generally categorized asthe “drawing” versus“compositing” methods. There are three “drawing” methods of NSImage: ● drawAtPoint:fromRect:operation:fraction: ● drawInRect:fromRect:operation:fraction: ● drawRepresentation:inRect: The drawing methods are among the most commonly-used methods of NSImage because of their basic safety. Images are typically rendered in offscreen windows and then copied to the screen as needed. In some cases, several images may be composited into the same window for efficiency reasons. The draw methods use extra safety checking to ensure that only the contents of the current image are ever drawn in one of your views. The same is not true of compositing methods, of which there are the following: ● compositeToPoint:operation: ● compositeToPoint:fromRect:operation: ● compositeToPoint:fromRect:operation:fraction: ● compositeToPoint:operation:fraction: These methods can be more efficient than the drawing methods because they perform fewer checks on the image bounds. These methods do have other behaviors that you need to understand, however. The most important behavior is that the compositing methods undo any scale or rotation factors (but not translation Images Image Basics 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 82factors) applied to the CTM prior to drawing. If you are drawing in a flipped view or manually applied scaling or rotation valuesto the current context, these methods will ignore those transformations. Although this might seem like a problem, it actually can be a very useful tool. For example, if your program is scaling a graphic element, you might want to add a scale value to your transform to do the scaling (at least temporarily). If your element usesimage-based selection handles, you could use the compositing methodsto prevent those handles from being scaled along with the rest of your graphic element. The other thing to remember about the compositing methods is that none of them allow you to scale your image to a target rectangle. Cocoa composites the entire image (or designated portion thereof) bit-for-bit to the specified location. This is in contrast to the drawInRect:fromRect:operation:fraction: method, which lets you scale all or part of your image to the designated target rectangle in your view. Note: The dissolveToPoint:fraction: and dissolveToPoint:fromRect:fraction: methods behave in a similar manner asthe corresponding compositing methods. Their use is generally more limited though and better support for dissolving images is available through Core Image. Supported Image File Formats Cocoa supports many common image formats internally and can import image data from many more formats through the use of the Image I/O framework (ImageIO.framework). Basic Formats Table 5-5 lists the formats supported natively by Cocoa. (Uppercase versions of the filename extensions are also recognized.) Table 5-5 Cocoa supported file formats Format Filename extensions UTI Portable Document Format (PDF) .pdf com.adobe.pdf .eps, .epi, .epsf, .epsi, .ps Encapsulated PostScript (EPS) Tagged Image File Format (TIFF) .tiff, .tif public.tiff public.jpeg, public.jpeg-2000 Joint Photographic Experts Group .jpg, .jpeg, .jpe (JPEG), JPEG-2000 Graphic Interchange Format (GIF) .gif com.compuserve.gif Images Supported Image File Formats 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 83Format Filename extensions UTI Portable Network Graphic (PNG) .png public.png Macintosh Picture Format (PICT) .pict, .pct, .pic com.apple.pict Windows Bitmap Format (DIB) .bmp, .BMPf com.microsoft.bmp Windows Icon Format .ico com.microsoft.ico Icon File Format .icns com.apple.icns TIFF Compression TIFF images can be read from compressed data, aslong asthe compression algorithm is one of the fourschemes described in Table 5-6. Table 5-6 TIFF compression settings Compression Description Compresses and decompresses without information loss, achieving compression ratios up to 5:1. It may be somewhat slower to compress and decompress than the PackBits scheme. LZW Compresses and decompresses without information loss, but may not achieve the same compression ratios as LZW. PackBits JPEG JPEG compression is no longer supported in TIFF files, and this factor is ignored. Compresses and decompresses 1 bit gray-scale images using international fax compression standards CCITT3 and CCITT4. CCITTFAX An NSImage object can also produce compressed TIFF data using any of these schemes. To get the TIFF data, use the TIFFRepresentationUsingCompression:factor: method of NSImage. Support for Other File Formats In OS X v10.4 and later, NSImage supports many additional file formats using the Image I/O framework. To get a complete list of supported filename extensions, use the imageFileTypes class method of NSImage. The list of supported file formats continues to grow but Table 5-7 lists some of the more common formats that can be imported. Images Supported Image File Formats 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 84Table 5-7 Additional formats supported by Cocoa Type Filename extension Adobe RAW .dng Canon 2 RAW .cr2 Canon RAW .crw FlashPix .fpx, .fpix Fuji RAW .raf Kodak RAW .dcr MacPaint .ptng, .pnt, .mac Minolta RAW .mrw Nikon RAW .nef Olympus RAW .orf OpenEXR .exr Photoshop .psd QuickTime Import Format .qti, .qtif Radiance .hdr SGI .sgi Sony RAW .srf Targa .targa, .tga Windows Cursor .cur XWindow bitmap .xbm The Image I/O framework is part of Quartz, although the actual framework is part of the Application Services framework. Image I/O handles the importing and exporting of many file formats. To use Quartz directly, you read image data using the CGImageSourceRef opaque type and write using the CGImageDestinationRef type. For more information on using the Image I/O framework to read and write images, see CGImageSource Reference and CGImageDestination Reference . Images Supported Image File Formats 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 85Guidelines for Using Images Here are some guidelines to help you work with images more effectively: ● Use the NSImage interface whenever possible. The goal of NSImage is to simplify your interactions with image data. Working directly with image representations should be done only as needed. ● Treat NSImage and its image representations as immutable objects. The goal of NSImage is to provide an efficient way to display images on the target canvas. Avoid manipulating the data of an image representation directly, especially if there are alternatives to manipulating the data, such as compositing the image and some other content into a new image object. ● For screen-based drawing, it is best to use the built-in caching mechanism of NSImage. Using an NSCachedImageRep object is more efficient than an NSBitmapImageRep object with the same data. Cached image representations store image data using a CGImageRef object, which can be stored directly on the video card by Quartz. ● There is little benefit to storing multiple representations of the same image (possibly at different sizes) in a single NSImage. Modern hardware is powerful enough to resize and scale images quickly. The only reason to considerstoring multiple representationsisif each of those representations contains a customized version of the image or if your app supports high-resolution displays. ● If caching is enabled and you modify an image representation object directly, be sure to invoke the recache method of the owning NSImage object. Cocoa relies on cached content wherever possible to improve performance and does not automatically recreate its caches when you modify image representations. You must tell the image object to recreate its caches explicitly. ● Avoid recreating art that is already provided by the system. OS X makes several standard pieces of artwork available for inclusion in your own interfaces. This artwork ranges from standard icons to other elements you can integrate into your controls. You load standard images using the imageNamed: method. For a list of standard artwork, see the constants section in NSImage Class Reference . ● If your app supports high resolution displays, follow the guidelines in High Resolution Guidelines for OS X for providing and naming standard- and high-resolution versions of image resources. That document also outlines additions and changes to the NSImage class as of OS X v10.7.4. OS X defines several technologies for working with images. Although the NSImage class is a good general purpose class for creating, manipulating, and drawing images, there may be times when it might be easier or more efficient to use other imaging technologies. For example, rather than manually dissolving from one image to another by drawing partially transparent versions of each image over time, it would be more efficient to use Core Image to perform the dissolve operation for you. For information about other image technologies, and when you might use them, see “Choosing the Right Imaging Technology” (page 169). Images Guidelines for Using Images 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 86Creating NSImage Objects Before you can draw an image, you have to create or load the image data. Cocoa supports several techniques for creating new images and loading existing images. Loading an Existing Image For existing images, you can load the image directly from a file or URL using the methods of NSImage. When you open an image file, NSImage automatically creates an image representation that best matches the type of data in that file. Cocoa supports numerous file formats internally. In OS X v10.4 and later, Cocoa supports even more file formats using the Image I/O framework. For information on supported file types,see “Supported Image File Formats” (page 83). The following example shows how to load an existing image from a file. It is important to remember that images loaded from an existing file are intended primarily for rendering. If you want to manipulate the data directly, copy it to an offscreen window or other local data structure and manipulate it there. NSString* imageName = [[NSBundle mainBundle] pathForResource:@"image1" ofType:@"JPG"]; NSImage* tempImage = [[NSImage alloc] initWithContentsOfFile:imageName]; Loading a Named Image For frequently used images, you can use the Application Kit’s named image registry to load and store them. This registry provides a fast and convenient way to retrieve images without creating a new NSImage object each time. You can add images to this registry explicitly or you can use the registry itself to load known system or application-specific images, such as the following: ● System images stored in the Resources directory of the Application Kit framework ● Your application’s icon or other images located in the Resources directory of your main bundle. To retrieve images from the registry, you use the imageNamed: class method of NSImage. This method looks in the registry for an image associated with the name you provide. If none is found, it looks for the image among the Application Kit's shared resources. After that, it looks for a file in the Resources directory of your application bundle, and finally it checks the Application Kit bundle. If it finds an image file, it loads the image, adds it to the registry, and returns the corresponding NSImage object. As long as the corresponding image object is retained somewhere by your code, subsequent attempts to retrieve the same image file return the already-loaded NSImage object. Images Creating NSImage Objects 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 87To retrieve your application icon, ask for an image with the constant, NSImageNameApplicationIcon (on versions of OS X before v10.6, you can use the string @"NSApplicationIcon"). Your application's custom icon is returned, if it has one; otherwise, Cocoa returns the generic application icon provided by the system. For a list of image names you can use to load other standard system images, see the constants section in NSImage Class Reference . In addition to loading existing image files, you can also add images to the registry explicitly by sending a setName: message to an NSImage object. The setName: method adds the image to the registry under the designated name. You might use this method in cases where the image was created dynamically or is not located in your application bundle. Note: When adding images to the registry explicitly, choose a name that does not match the name of any image in your application bundle. If you choose a name that is used by a bundle resource, the explicitly added image supersedesthat resource. You can still load the resource using the methods of NSBundle, however. Drawing to an Image by Locking Focus It is possible to create images programmatically by locking focus on an NSImage object and drawing other images or paths into the image context. This technique is most useful for creating images that you intend to render to the screen, although you can also save the resulting image data to a file. Listing 5-1 shows you how to create a new empty image and configure it for drawing. When creating a blank image, you mustspecify the size of the new image in pixels. If you lock focus on an image that contains existing content, the new content is composited with the old content. When drawing, you can use any routines that you would normally use when drawing to a view. Listing 5-1 Drawing to an image NSImage* anImage = [[NSImage alloc] initWithSize:NSMakeSize(100.0, 100.0)]; [anImage lockFocus]; // Do your drawing here... [anImage unlockFocus]; // Draw the image in the current context. [anImage drawAtPoint:NSMakePoint(0.0, 0.0) Images Creating NSImage Objects 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 88fromRect: NSMakeRect(0.0, 0.0, 100.0, 100.0) operation: NSCompositeSourceOver fraction: 1.0]; Drawing to an image creates an NSCachedImageRep object or uses an existing cached image representation, if one exists. Even when you use the lockFocusOnRepresentation: method to lock onto a specific image representation, you do not lock onto the representation itself. Instead, you lock onto the cached offscreen window associated with that image representation. This behavior might seem confusing but reinforces the notion of the immutability of images and their image representations. Images and their representations are considered immutable for efficiency and safety reasons. If you consider the image files stored in your application bundle, would you really want to make permanent changes to the original image? Rather than change the original image data, NSImage and its image representations modify a copy of that data. Modifying a cached copy of the data is also more efficient forscreen-based drawing because the data is already in a format ready for display on the screen. Drawing Offscreen Images Using a Block-Based Drawing Method to Support High Resolution Displays If your app uses the lockFocus and unlockFocus methods of the NSImage class for offscreen drawing, consider using the method imageWithSize:flipped:drawingHandler: instead (available in OS X v10.8). If you use the lock focus methodsfor drawing, you can get unexpected results—either you’ll get a low resolution NSImage object that looks incorrect when drawn, or you’ll get a 2x image that has more pixels in its bitmap than you are expecting. Using the imageWithSize:flipped:drawingHandler: method ensures you’ll get correct results under standard and high resolution. The drawing handler is a block that can be invoked whenever the image is drawn to, and on whatever thread the drawing occurs. You should make sure that any state you access within the block is done in a thread-safe manner. The code in the block should be the same code that you would use between the lockFocus and unlockFocus methods. Creating a Bitmap There are a few different ways to create bitmaps in Cocoa. Some of these techniques are more convenient than others and some may not be available in all versions of OS X, so you should consider each one carefully. The following list summarizes the most common techniques and the situations in which you might use them: ● To create a bitmap from the contents of an existing CIImage object (in OS X v10.5 and later), use the initWithCIImage: method of NSBitmapImageRep. Images Creating NSImage Objects 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 89● To create a bitmap from the contents of a Quartz image (in OS X v10.5 and later), use the initWithCGImage: method of NSBitmapImageRep. When initializing bitmaps using this method, you should treat the returned bitmap as a read-only object. In addition, you should avoid accessing the bitmap data directly, as doing so requires the unpacking of the CGImageRef data into a separate set of buffers. ● To capture the contents of an existing view or image, use one of the following techniques: ● Lock focus on the desired object and use the initWithFocusedViewRect: method of NSBitmapImageRep. ● In OS X v10.4 and later, use the bitmapImageRepForCachingDisplayInRect: and cacheDisplayInRect:toBitmapImageRep:methods of NSView. The firstmethod creates a bitmap image representation suitable for use in capturing the view's contents while the second draws the view contents to the bitmap. You can reuse the bitmap image representation object to update the view contents periodically, as long as you remember to clear the old bitmap before capturing a new one. ● To draw directly into a bitmap, create a new NSBitmapImageRep object with the parameters you want and use the graphicsContextWithBitmapImageRep: method of NSGraphicsContext to create a drawing context. Make the new context the current context and draw. This technique is available only in OS X v10.4 and later. Alternatively, you can create an NSImage object (or an offscreen window), draw into it, and then capture the image contents. This technique is supported in all versions of OS X. ● To create the bitmap bit-by-bit, create a new NSBitmapImageRep object with the parameters you want and manipulate the pixels directly. You can use the bitmapData method to get the raw pixel buffer. NSBitmapImageRep also defines methods for getting and setting individual pixel values. This technique is the most labor intensive but gives you the most control over the bitmap contents. For example, you might use it if you want to decode the raw image data yourself and transfer it to the bitmap image representation. The sections that follow provide examples on how to use the first two techniques from the preceding list. For information on how to manipulate a bitmap, see NSBitmapImageRep Class Reference . Images Creating NSImage Objects 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 90Important: In many operating systems, offscreen bitmaps are used to buffer the actual content of a view or window. In OS X, you should generally not use offscreen bitmaps in this way. Most OS X windows are already double-buffered to prevent rendering artifacts caused by drawing during a refresh cycle. Adding your own offscreen bitmap would result in your window being triple-buffered, which is a waste of memory. Capturing the Contents of a View or Image A simple way to create a bitmap is to capture the contents of an existing view or image. When capturing a view, the view can either belong to an onscreen window or be completely detached and not onscreen at all. When capturing an image, Cocoa chooses the image representation that provides the best match for your target bitmap. Before attempting to capture the contents of a view, you should consider invoking the view’s canDraw method to see if the view should be drawn. Cocoa views return NO from this method in situations where the view is currently hidden or not associated with a valid window. If you are trying to capture the current state of a view, you might use the canDraw method to prevent your code from capturing the view when it is hidden. Once you have your view or image, lock focus on it and use the initWithFocusedViewRect: method of NSBitmapImageRep to capture the contents. When using this method, you specify the exact rectangle you want to capture from the view or image. Thus, you can capture all of the contents or only a portion; you cannot scale the content you capture. The initWithFocusedViewRect: method captures the bits exactly as they appear in the focused image or view. Listing 5-2 shows how to create a bitmap representation from an existing image. The example gets the image to capture from a custom routine, locks focus on it, and creates the NSBitmapImageRep object. Your own implementation would need to replace the call to myGetCurrentImage with the code to create or get the image used by your program. Listing 5-2 Capturing the contents of an existing image NSImage* image = [self myGetCurrentImage]; NSSize size = [image size]; [image lockFocus]; NSBitmapImageRep* rep = [[NSBitmapImageRep alloc] initWithFocusedViewRect: NSMakeRect(0,0,size.width,size.height)]; [image unlockFocus]; Images Creating NSImage Objects 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 91To capture the content of an onscreen view, you would use code very much like the preceding example. After locking focus on the view, you would create your NSBitmapImageRep object using the initWithFocusedViewRect: method. To capture the content of a detached (offscreen) view, you must create an offscreen window for the view before you try to capture its contents. The window object provides a backing buffer in which to hold the view’s rendered content. As long as you do not order the window onto the screen, the origin you specify for your window does not really matter. The example in Listing 5-3 uses large negative values for the origin coordinates (just to make sure the window is not visible) but could just as easily use the coordinate (0, 0). Listing 5-3 Drawing to an offscreen window NSRect offscreenRect = NSMakeRect(-10000.0, -10000.0, windowSize.width, windowSize.height); NSWindow* offscreenWindow = [[NSWindow alloc] initWithContentRect:offscreenRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreRetained defer:NO]; [offscreenWindow setContentView:myView]; [[offscreenWindow contentView] display]; // Draw to the backing buffer // Create the NSBitmapImageRep [[offscreenWindow contentView] lockFocus]; NSBitmapImageRep* rep = [[NSBitmapImageRep alloc] initWithFocusedViewRect: NSMakeRect(0, 0, windowSize.width, windowSize.height)]; // Clean up and delete the window, which is no longer needed. [[offscreenWindow contentView] unlockFocus]; [offscreenWindow release]; Drawing Directly to a Bitmap In OS X v10.4 and later, it is possible to create a bitmap image representation object and draw to it directly. This technique is simple and does not require the creation of any extraneous objects, such as an image or window. If your code needs to run in earlier versions of OS X, however, you cannot use this technique. Images Creating NSImage Objects 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 92Listing 5-4, creates a new NSBitmapImageRep object with the desired bit depth, resolution, and color space. It then creates a new graphics context object using the bitmap and makes that context the current context. Listing 5-4 Drawing directly to a bitmap NSRect offscreenRect = NSMakeRect(0.0, 0.0, 500.0, 500.0); NSBitmapImageRep* offscreenRep = nil; offscreenRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:nil pixelsWide:offscreenRect.size.width pixelsHigh:offscreenRect.size.height bitsPerSample:8 samplesPerPixel:4 hasAlpha:YES isPlanar:NO colorSpaceName:NSCalibratedRGBColorSpace bitmapFormat:0 bytesPerRow:(4 * offscreenRect.size.width) bitsPerPixel:32]; [NSGraphicsContext saveGraphicsState]; [NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithBitmapImageRep:offscreenRep]]; // Draw your content... [NSGraphicsContext restoreGraphicsState]; Once drawing is complete, you can add the bitmap image representation object to an NSImage object and display it like any other image. You can use this image representation object as a texture in your OpenGL code or examine the bits of the bitmap using the methods of NSBitmapImageRep. Creating a PDF or EPS Image Representation The process for creating an image representation for PDF or EPS data is the same for both. In both cases, you use a custom NSView object together with the Cocoa printing system to generate the desired data. From the generated data, you then create an image representation of the desired type. Images Creating NSImage Objects 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 93The NSView class defines two convenience methods for generating data based on the contents of the view: ● For PDF data, use the dataWithPDFInsideRect: method of NSView. ● For EPS data, use the dataWithEPSInsideRect: method of NSView. When you send one of these messages to your view, Cocoa launches the printing system, which drives the data generation process. The printing system handles most of the data generation process,sending appropriate messages to your view object as needed. For example, Cocoa sends a drawRect: message to your view for each page that needs to be drawn. The printing system also invokes other methods to compute page ranges and boundaries. Note: The NSView class provides a default pagination scheme. To provide a custom scheme, your view must override the knowsPageRange: and rectForPage: methods at a minimum. For more information about printing and pagination, see Printing Programming Guide for OS X . After the printing system finishes, the code that called either dataWithPDFInsideRect: or dataWithEPSInsideRect: receives an NSData object with the PDF or EPS data. You must then pass this object to the imageRepWithData: method of either NSEPSImageRep or NSPDFImageRep to initialize a new image representation object, which you can then add to your NSImage object. Listing 5-5 shows the basic steps for creating a PDF image from some view content. The view itself must be one that knows how to draw the desired content. This can be a detached view designed solely for drawing the desired content with any desired pagination, or it could be an existing view in one of your windows. Listing 5-5 Creating PDF data from a view MyPDFView* myView = GetMyPDFRenderView(); NSRect viewBounds = [myView bounds]; NSData* theData = [myView dataWithPDFInsideRect:viewBounds]; NSPDFImageRep* pdfRep = [NSPDFImageRep imageRepWithData:theData]; // Create a new image to hold the PDF representation. NSImage* pdfImage = [[NSImage alloc] initWithSize:viewBounds.size]; [pdfImage addRepresentation:pdfRep]; Images Creating NSImage Objects 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 94If you choose to use an existing onscreen view, your view’s drawing code should distinguish between content drawn for the screen or for the printing system and adjust content accordingly. Use the currentContextDrawingToScreen class method or the isDrawingToScreen instance method of NSGraphicsContext to determine whether the current context is targeted for the screen or a print-based canvas. These methods return NO for operations that generate PDF or EPS data. Important: When drawing in a printing context, the only supported compositing operators are NSCompositeCopy and NSCompositeSourceOver. If you need to render content using any other operators, you must composite them to an image or offscreen window first and then render the resulting image to the printing context using one of the supported operators. Using a Quartz Image to Create an NSImage The NSImage class does not provide any direct means for wrapping data from a Quartz image object. If you have a CGImageRef object, the simplest way to create a corresponding Cocoa image is to lock focus on an NSImage object and draw yourQuartz image using the CGContextDrawImage function. The basic techniques for how to do this are covered in “Drawing to an Image by Locking Focus” (page 88). Working with Images Once you have an image, there are many ways you can use it. The simplest thing you can do is draw it into a view as part of your program’s user interface. You can also process the image further by modifying it in any number of ways. The following sections show you how to perform several common tasks associated with images. Drawing Images into a View The NSImage class defines several methods for drawing an image into the current context. The two most commonly used methods are: ● drawAtPoint:fromRect:operation:fraction: ● drawInRect:fromRect:operation:fraction: These methods offer a simple interface for rendering your images, but more importantly, they ensure that only your image content is drawn. Other methods, such as the compositeToPoint:operation: method and its variants, are fast at drawing images but they do not check the image’s boundaries before drawing. If the drawing rectangle strays outside of the image bounds, it is possible to draw content not belonging to your Images Working with Images 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 95image. If the image resides on a shared offscreen window, which many do, it is even possible to draw portions of other images. For more information about the differences between these methods, see “Drawing Versus Compositing” (page 82). With one exception, all of the drawing and compositing methods choose the image representation that is best suited for the target canvas—see “How an Image Representation Is Chosen” (page 77). The one exception is the drawRepresentation:inRect: method, which uses the image representation object you specify. For more information about the use of these methods, see the NSImage reference. Images support the same set of compositing options as other Cocoa content, with the same results. For a complete list of compositing options and an illustration of their effects,see “Setting Compositing Options” (page 32). Drawing Resizable Textures Using Images If you are implementing a resizable custom control and want the control to have a textured background that does not distort as the control is resized, you would typically break up the background portion into several different images and composite them together. Although some of the images would contain fixed size content, others would need to be designed to present a smooth texture even after being resized or tiled. When it comes time to draw the images, however, you should avoid doing the drawing yourself. Instead, you should use the following AppKit functions, which were introduced in OS X v10.5: ● NSDrawThreePartImage ● NSDrawNinePartImage Drawing multipart images cleanly on high-resolution screens can be very challenging. If you are not careful about aligning images correctly on integral boundaries, the resulting texture might contain pixel cracks or other visual artifacts. The AppKit functionstake into account all of the factorsrequired to draw multipart images correctly in any situation, including situations where resolution independence scale factors other than 1.0 are in use. Figure 5-2 shows how you assemble a three-part image for a horizontally resizable control. The two end caps are fixed size images that provide the needed decoration for the edges of the background. The center fill portion then resizes appropriately to fit the bounding rectangle you pass into the NSDrawThreePartImage Images Working with Images 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 96function. (If you wanted the control to be resizable in the vertical direction, you would stack these images vertically instead of horizontally.) After drawing the background with this function, you would then layer any additional content on top of the background as needed. Figure 5-2 Drawing a three-part image Figure 5-3 shows you how to assemble a nine-part image for a control that can be resized both vertically and horizontally. In this case, the size of the corner pieces stays fixed but the five remaining fill images vary in size to fit the current bounding rectangle. Figure 5-3 Drawing a nine-part image For more information about these functions, see their descriptions in Application Kit Functions Reference . Images Working with Images 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 97Creating an OpenGL Texture In OpenGL, a texture is one way to paint the surface of an object. For complex or photorealistic surfaces, it may be easier to apply a texture than render the same content using primitive shapes. Almost any view or image in Cocoa can be used to create an OpenGL texture. From a view or image, you create a bitmap image representation object (as described in “Capturing the Contents of a View or Image” (page 91)) and then use that object to create your texture. Listing 5-6 shows a self-contained method for creating a texture from an NSImage object. After creating the NSBitmapImageRep object, this method configures some texture-related parameters, creates a new texture object, and then associates the bitmap data with that object. This method handles 24-bit RGB and 32-bit RGBA images, but you could readily modify it to support other image formats. You must pass in a pointer to a valid GLuint variable for texName but the value stored in that parameter can be 0. If you specify a nonzero value, your identifier is associated with the texture object and can be used to identify the texture later; otherwise, an identifier is returned to you in the texName parameter. Listing 5-6 Creating an OpenGL texture from an image - (void)textureFromImage:(NSImage*)theImg textureName:(GLuint*)texName { NSBitmapImageRep* bitmap = [NSBitmapImageRep alloc]; int samplesPerPixel = 0; NSSize imgSize = [theImg size]; [theImg lockFocus]; [bitmap initWithFocusedViewRect: NSMakeRect(0.0, 0.0, imgSize.width, imgSize.height)]; [theImg unlockFocus]; // Set proper unpacking row length for bitmap. glPixelStorei(GL_UNPACK_ROW_LENGTH, [bitmap pixelsWide]); // Set byte aligned unpacking (needed for 3 byte per pixel bitmaps). glPixelStorei (GL_UNPACK_ALIGNMENT, 1); // Generate a new texture name if one was not provided. if (*texName == 0) glGenTextures (1, texName); Images Working with Images 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 98glBindTexture (GL_TEXTURE_RECTANGLE_EXT, *texName); // Non-mipmap filtering (redundant for texture_rectangle). glTexParameteri(GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_MIN_FILTER, GL_LINEAR); samplesPerPixel = [bitmap samplesPerPixel]; // Nonplanar, RGB 24 bit bitmap, or RGBA 32 bit bitmap. if(![bitmap isPlanar] && (samplesPerPixel == 3 || samplesPerPixel == 4)) { glTexImage2D(GL_TEXTURE_RECTANGLE_EXT, 0, samplesPerPixel == 4 ? GL_RGBA8 : GL_RGB8, [bitmap pixelsWide], [bitmap pixelsHigh], 0, samplesPerPixel == 4 ? GL_RGBA : GL_RGB, GL_UNSIGNED_BYTE, [bitmap bitmapData]); } else { // Handle other bitmap formats. } // Clean up. [bitmap release]; } In the preceding code, there are some additional points worth mentioning: ● GL_TEXTURE_RECTANGLE_EXT is used for non–power-of-two texture support, which is not supported on the Rage 128 hardware. ● The gluScaleImage() function can be used to scale non-PoT texturesinto PoT dimensionsfor hardware that doesn't support GL_TEXTURE_RECTANGLE_EXT. ● When you call this method, the current context must be a valid OpenGL context. For more information about OpenGL graphics contexts, see “Using OpenGL in Your Application” (page 165). Images Working with Images 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 99● Upon completion, the texture is bound to the value in texName. If you specified 0 for the texName parameter, a new texture ID is generated for you and returned in texName. For more information on Apple's support for OpenGL, see OpenGL Programming Guide for Mac . Applying Core Image Filters In OS X v10.4 and later, Core Image filters are a fast and efficient way to modify an image without changing the image itself. Core Image filters use graphics acceleration to apply real-time effects such as Gaussian blurs, distortions, and color corrections to an image. Because the filters are applied when content is composited to the screen, they do not modify the actual image data. Core Image filters operate on CIImage objects. If you have an existing CIImage object, you can simply apply any desired filtersto it and use it to create an NSCIImageRep object. You can then add thisimage representation object to an NSImage object and draw the results in your view. In OS X v10.5 and later, you can also use the initWithCIImage: method of NSBitmapImageRep to render already-processed images directly to a bitmap representation. If you do not already have a CIImage object, you need to create one using your program’s existing content. The first step is to create a bitmap image representation for the content you want to modify, the process for which is described in “Creating a Bitmap” (page 89). Once you have an NSBitmapImageRep object, use the initWithBitmapImageRep: method of CIImage to create a Core Image image object. For information on how to apply Core Image filters to a CIImage object, see “Using Core Image Filters” in Core Image Programming Guide . Getting and Setting Bitmap Properties Every NSBitmapImageRep object contains a dictionary that defines the bitmap’s associated properties. These properties identify important information about the bitmap, such as how it was compressed, its color profile (if any), its current gamma level, its associated EXIF data, and so on. When you create a new NSBitmapImageRep from an existing image file, many of these properties are set automatically. You can also access and modify these properties using the valueForProperty: and setProperty:withValue: methods of NSBitmapImageRep. For a complete list of properties you can get and set for a bitmap, see NSBitmapImageRep Class Reference . Converting a Bitmap to a Different Format The NSBitmapImageRep class provides built-in support for converting bitmap data to severalstandard formats. To convert bitmap images to other formats, you can use any of the following methods: Images Working with Images 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 100● +TIFFRepresentationOfImageRepsInArray: ● +TIFFRepresentationOfImageRepsInArray:usingCompression:factor: ● -TIFFRepresentation ● -TIFFRepresentationUsingCompression:factor: ● +representationOfImageRepsInArray:usingType:properties: ● -representationUsingType:properties: The first set of methods generate TIFF data for the bitmap. For all other supported formats, you use the representationOfImageRepsInArray:usingType:properties: and representationUsingType:properties: methods. These methods support the conversion of bitmap data to BMP, GIF, JPEG, PNG, and TIFF file formats. All of the preceding methods return an NSData object with the formatted image data. You can write this data out to a file or use it to create a newNSBitmapImageRep object. Associating a Custom Color Profile With an Image You can associate a custom ColorSync profile with a NSBitmapImageRep object containing pixel data produced by decoding a TIFF, JPEG, GIF or PNG file. To associate the data with the bitmap image representation, you use the setProperty:withValue: method of NSBitmapImageRep and the NSImageColorSyncProfileData property. Listing 5-7 shows an example of how to load the ColorSync data and associate it with a bitmap image representation. Listing 5-7 Adding a ColorSync profile to an image @implementation NSBitmapImageRep (MoreColorMethods) - (NSBitmapImageRep *) imageRepWithProfileAtPath:(NSString *) pathToProfile { id result = [self copy]; // Build an NSData object using the specified ColorSync profile id profile = [NSData dataWithContentsOfFile: pathToProfile]; // Set the ColorSync profile for the object [result setProperty:NSImageColorSyncProfileData withValue:profile]; return [result autorelease]; Images Working with Images 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 101} @end In OS X v10.5, it is also possible to associate a custom ICC color profile with an NSBitmapImageRep object. To do so, you must initialize your NSBitmapImageRep instance using the calibrated RGB colorspace (NSCalibratedRGBColorSpace). After that, you load the profile and associate the corresponding data object with the NSImageColorSyncProfileData key exactly as you would for a ColorSync profile. Converting Between Color Spaces Cocoa does not provide any direct ways to convert images from one color space to another. Although Cocoa fully supports color spaces included with existing image files, there is no way to convert image data directly using NSImage. Instead, you must use a combination of Quartz and Cocoa to convert the image data. Creating the Target Image Converting the color space of an existing image requires the use of Quartz to establish a drawing context that uses the target color space. Once you have a CGContextRef object with the desired color space, you can use it to configure the Cocoa drawing environment and draw your image. Listing 5-8 shows you how to create a Quartz bitmap context using a custom colorspace. Thisfunction receives a CMProfileRef object, which you can get from the ColorSync Manager or from the colorSyncProfile method of NSColorSpace. It uses the color profile to determine the number of channels in the color space. Once it knows the total number of channels (including alpha) needed for the bitmap, it creates and returns a matching bitmap context. Listing 5-8 Creating a bitmap with a custom color profile CGContextRef CreateCGBitmapContextWithColorProfile(size_t width, size_t height, CMProfileRef profile, CGImageAlphaInfo alphaInfo) { size_t bytesPerRow = 0; size_t alphaComponent = 0; // Get the type of the color space. CMAppleProfileHeader header; Images Working with Images 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 102if (noErr != CMGetProfileHeader(profile, &header)) return nil; // Get the color space info from the profile. CGColorSpaceRef csRef = CGColorSpaceCreateWithPlatformColorSpace(profile); if (csRef == NULL) return NULL; // Add 1 channel if there is an alpha component. if (alphaInfo != kCGImageAlphaNone) alphaComponent = 1; // Check the major color spaces. OSType space = header.cm2.dataColorSpace; switch (space) { case cmGrayData: bytesPerRow = width; // Quartz doesn’t support alpha for grayscale bitmaps. alphaInfo = kCGImageAlphaNone; break; case cmRGBData: bytesPerRow = width * (3 + alphaComponent); break; case cmCMYKData: bytesPerRow = width * 4; // Quartz doesn’t support alpha for CMYK bitmaps. alphaInfo = kCGImageAlphaNone; break; default: Images Working with Images 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 103return NULL; } // Allocate the memory for the bitmap. void* bitmapData = malloc(bytesPerRow * height); CGContextRef theRef = CGBitmapContextCreate(bitmapData, width, height, 8, bytesPerRow, csRef, alphaInfo); // Cleanup if an error occurs; otherwise, the caller is responsible // for releasing the bitmap data. if ((!theRef) && bitmapData) free(bitmapData); CGColorSpaceRelease(csRef); return theRef; } Once you have a Quartz bitmap context, you can create a new Cocoa graphics context object and use it for drawing. To create the NSGraphicsContext object, you use the graphicsContextWithGraphicsPort:flipped: method, which takes a CGContextRef object as a parameter. You then use the setCurrentContext: method to make it current and begin drawing. When you are done drawing, you use Quartz to create a CGImageRef object containing the results. Listing 5-9 shows this process. Listing 5-9 Converting a bitmap to a different color space - (CGImageRef) convertBitmapImageRep:(NSBitmapImageRep*)theRep toColorSpace:(NSColorSpace*)colorspace { if (!theRep) return nil; // Map the Cocoa constants returned by -bitmapFormat to their // Quartz equivalents. Images Working with Images 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 104CGImageAlphaInfo alphaInfo = GetAlphaInfoFromBitmapImageRep(theRep); // Get the rest of the image info. NSSize imageSize = [theRep size]; size_t width = imageSize.width; size_t height = imageSize.height; CMProfileRef profile = (CMProfileRef)[colorspace colorSyncProfile]; // Create a new 8-bit bitmap context based on the image info. CGContextRef cgContext = CreateCGBitmapContextWithColorProfile(width, height, profile, alphaInfo); if (cgContext == NULL) return NULL; // Create an NSGraphicsContext that draws into the CGContext. NSGraphicsContext *graphicsContext = [NSGraphicsContext graphicsContextWithGraphicsPort:cgContext flipped:NO]; // Make the NSGraphicsContext current and draw into it. [NSGraphicsContext saveGraphicsState]; [NSGraphicsContext setCurrentContext:graphicsContext]; // Create a new image for rendering the original bitmap. NSImage* theImage = [[[NSImage alloc] initWithSize:imageSize] autorelease]; [theImage addRepresentation:theRep]; // Draw the original image in the Quartz bitmap context. NSRect imageRect = NSMakeRect(0.0, 0.0, imageSize.width, imageSize.height); [theImage drawAtPoint:NSMakePoint(0.0, 0.0) fromRect:imageRect operation: NSCompositeSourceOver fraction: 1.0]; [NSGraphicsContext restoreGraphicsState]; Images Working with Images 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 105// Create a CGImage from the CGContext's contents. CGImageRef cgImage = CGBitmapContextCreateImage(cgContext); // Release the context. Note that this does not release the bitmap data. CGContextRelease(cgContext); return cgImage; } There are two ways to get an NSImage object from a CGImageRef type. In OS X v10.5 and later, you can create an NSBitmapImageRep object using its initWithCGImage: method and then add that image representation to an NSImage object. If your code needs to run in versions of OS X v10.4 or earlier, however, you can lock focus on an NSImage object and use the CGContextDrawImage function to draw the Quartz image into the image. This latter technique creates a copy of the image data and requires more effort than using the initWithCGImage: method but is available on all versions of OS X. Listing 5-10 shows a sample method that demonstrates both approaches but always uses the best approach available for the target platform. Listing 5-10 Using a CGImageRef object to create an NSImage object - (NSImage*)imageFromCGImageRef:(CGImageRef)image { NSImage* newImage = nil; #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 NSBitmapImageRep* newRep = [[NSBitmapImageRep alloc] initWithCGImage:image]; NSSize imageSize; // Get the image dimensions. imageSize.height = CGImageGetHeight(image); imageSize.width = CGImageGetWidth(image); newImage = [[NSImage alloc] initWithSize:imageSize]; [newImage addRepresentation:newRep]; #else Images Working with Images 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 106NSRect imageRect = NSMakeRect(0.0, 0.0, 0.0, 0.0); CGContextRef imageContext = nil; // Get the image dimensions. imageRect.size.height = CGImageGetHeight(image); imageRect.size.width = CGImageGetWidth(image); // Create a new image to receive the Quartz image data. newImage = [[NSImage alloc] initWithSize:imageRect.size]; [newImage lockFocus]; // Get the Quartz context and draw. imageContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; CGContextDrawImage(imageContext, *(CGRect*)&imageRect, image); [newImage unlockFocus]; #endif return [newImage autorelease]; } Using a Custom Color Profile If you have an existing ICC profile and want to associate that profile with an image, you must do so using the ColorSync Manager. If you are working with Quartz graphic contexts, you use the ICC profile to obtain the color space information needed to create a CGImageRef object. You can then use that color space information to create an appropriate context for rendering your image. Listing 5-11 shows you how to create a CGColorSpaceRef object from an ICC profile. This code uses several ColorSync Manager functions to create a CMProfileRef object, from which you can then extract the color space object. OS X includes several standard ICC profiles in the /System/Library/ColorSync/Profiles/ directory. Listing 5-11 Creating a color space from a custom color profile CGColorSpaceRef CreateColorSpaceForProfileAtPath(NSString* path) { Images Working with Images 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 107CMProfileLocation profileLoc; CMProfileRef profileRef; CGColorSpaceRef csRef = NULL; // Specify where the ICC profile data file is located. profileLoc.locType = cmPathBasedProfile; strncpy(profileLoc.u.pathLoc.path, [path fileSystemRepresentation], 255); // Get the ColorSync profile information from the data file. CMOpenProfile(&profileRef, &profileLoc); // Use the profile to create the color space object. csRef = CGColorSpaceCreateWithPlatformColorSpace(profileRef); CMCloseProfile(profileRef); return csRef; } For more information on ColorSync and its functions, see ColorSync Manager Reference . Premultiplying Alpha Values for Bitmaps Although premultiplying alpha values used to be a common way to improve performance when rendering bitmaps, the technique is not recommended for programsrunning inOS X. Premultiplication involves multiplying values in the bitmap’s alpha channel with the corresponding pixel values and storing the results back to the bitmap’s source file. The goal of pre-multiplication is to reduce the number of calculations performed when the bitmap is composited with other content. In OS X, premultiplication can actually result in more calculations. In OS X, color correction is integral to the operating system. In order to process colors correctly, ColorSync needs the original pixel color values. If a bitmap contains premultiplied color values, ColorSync must undo the premultiplication before it can check the colors. This extra step adds a significant amount of work to the system because it must be performed every time the colors are checked. Images Working with Images 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 108The only reason to consider premultiplication of alpha values for your bitmaps is if your data is already premultiplied and leaving it that way is beneficial to your program’s data model. Even so, you should do some performance tests to see if using premultiplied bitmaps hurts your overall application performance. Cocoa incorporates color management into many parts of the framework. If your code paths use these parts of the framework, you might find it beneficial to change your model. Creating New Image Representation Classes If you want to add support for new image formats or generate images from other types of source information, you may want to subclass NSImageRep. Although Cocoa supports many image formats directly, and many more indirectly through the Image IO framework,subclassing NSImageRep gives you control over the handling of image data while at the same time maintaining a tight integration with the NSImage class. If you decide to subclass, you should provide implementations for the following methods: ● imageUnfilteredTypes ● canInitWithData: ● initWithData: ● draw These methods provide the basic interface that the parent NSImageRep class needs to interact with your subclass. The methods provide information about what image data formats your class supports along with entry points for initializing your object and drawing the image. Before your subclass can be used, it must be registered with the Application Kit. You should do this early in your application’s execution by invoking the registerImageRepClass: class method of NSImageRep. Registering your class lets Cocoa know that your class exists and that it can handle a specific set of file types. Yourimplementation ofthe imageUnfilteredTypesmethod should return an array ofUTItypes corresponding to the image file types your class supports directly. Another method you should always override is the canInitWithData: method. Once your image representation class has been identified as handling a particular type of data, Cocoa may notify it when data of the appropriate type is received. At that time, Cocoa passes a data object to your canInitWithData: method. Your implementation of this method should examine the data quickly and verify that it can really handle the format. Images Creating New Image Representation Classes 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 109Note: If your subclass is capable of reading multiple images from a single file, you should also implement the imageRepsWithData: method. This method must parse the image data and check to see if it indeed contains multiple images. For each separate image, you should create an instance of your subclass and initialize it with the appropriate subset of the image data. Once your class is chosen to handle the image data, Cocoa looks for an initWithData: method and uses it to initialize your object with the image data. Your implementation of this method should retain the data and use it to initialize the object. At some point later, your draw method may be called to render the data in the current context. Your draw method should render the data at the current origin point and with the current size and settings specified by the NSImageRep parent class. Images Creating New Image Representation Classes 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 110Creating an effective and beautiful Mac app often requires the use of many different techniques. Beyond the basic drawing of paths and images in views, there are other ways to create more complex imagery for your application. The following sections cover many of the most commonly used techniques supported by Cocoa. Adding Shadows to Drawn Paths Cocoa provides support for shadows through the NSShadow class. A shadow mimics a light source cast on the object, making paths appear as if they’re floating above the surface of the view. Figure 6-1 shows the effect created by a shadow for a few paths. Figure 6-1 Shadows cast by rendered paths A shadow effect consists of horizontal and vertical offset values, a blur value, and the shadow color. These effects combine to give the illusion that there is a light above the canvas that is shining down on the shapes below. The offset and blur values effectively determine the position of the light and the height of the shapes above the canvas. 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 111 Advanced Drawing TechniquesShadow positions always use the base coordinate system of the view, ignoring any transforms you apply to the shapes in your view. This means that no matter how you manipulate the shapes in a view, the apparent position of the light generating the shadows never changes. If you want to change the apparent position of the light, you must change the shadow object attributes and apply the updated shadow object to the current graphics context before drawing your content. To create a shadow, you create an NSShadow object and call its methods to set the desired shadow attributes. If you anticipate one or more paths overlapping each other, you should be sure to choose a color that has an alpha value; otherwise, shadows that intersect other objects might look flat and ruin the effect. To apply the shadow, invoke its set method. Listing 6-1 shows the code used to create the shadow for the paths in Figure 6-1 (page 111). A partially transparent color is used to allow for overlapping paths and shadows. Listing 6-1 Adding a shadow to a path [NSGraphicsContext saveGraphicsState]; // Create the shadow below and to the right of the shape. NSShadow* theShadow = [[NSShadow alloc] init]; [theShadow setShadowOffset:NSMakeSize(10.0, -10.0)]; [theShadow setShadowBlurRadius:3.0]; // Use a partially transparent color for shapes that overlap. [theShadow setShadowColor:[[NSColor blackColor] colorWithAlphaComponent:0.3]]; [theShadow set]; // Draw your custom content here. Anything you draw // automatically has the shadow effect applied to it. [NSGraphicsContext restoreGraphicsState]; [theShadow release]; Shadow effects are stored as part of the graphics state, so once set, they affect all subsequent rendering commands in the current context. This is an important thing to remember because it might force you to think about the order in which you draw your content. For example, if you set up a shadow, fill a path, and then Advanced Drawing Techniques Adding Shadows to Drawn Paths 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 112stroke the same path, you do not get a single shape with an outline, fill color, and shadow. Instead, you get two shapes—an outline and a fill shape—and two shadows, one for each shape. If you stroke the path after filling it, the shadow for the stroked path appears on top of the filled shape. In Figure 6-1 (page 111), the desired effect was achieved by applying the shadow to only the fill shape of each path. Note: Another way to a single shadow for multiple paths is using a Quartz transparency layer. For more information about using transparency layers, see Quartz 2D Programming Guide . Creating Gradient Fills A gradient fill (also referred to as a shading in Quartz) is a pattern that gradually changes from one color to another. Unlike the image-based patterns supported by NSColor, a gradient fill does not tile colors to fill the target shape. Instead, it uses a mathematical function to compute the color at individual points along the gradient. Because they are mathematical by nature, gradients are resolution independent and scale readily to any device. Figure 6-2 shows some simple gradient fill patterns. Gradients a and b show linear gradients filling different Bezier shapes and aligned along different angles while gradients c and d show radial gradients. In the case of gradient c, the gradient was set to draw before and after the gradient’s starting and ending locations, thus Advanced Drawing Techniques Creating Gradient Fills 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 113creating both a white circle in the very center of the gradient and a black border surrounding the gradient. For gradient d, the center points of the circles used to draw the gradient are offset, creating a different sort of shading effect. Figure 6-2 Different types of gradients In OS X v10.5 and later, Cocoa provides support for drawing gradients using the NSGradient class. If your software runs on earlier versions of OS X, you must use Quartz or Core Image to perform gradient fills. Using the NSGradient Class In OS X v10.5 and later, you can use the NSGradient class to create complex gradient fill patterns without having to write your own color computation function. Gradient objects are immutable objects that store information about the colors in the gradient and provide an interface for drawing those colors to the current context. When you create an NSGradient object, you specify one or more NSColor objects and a set of optional location parameters. During drawing, the gradient object uses this information to compute the color transitions for the gradient. Advanced Drawing Techniques Creating Gradient Fills 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 114The NSGradient class supports both high-level and primitive drawing methods. The high-level methods provide a simple interface for drawing gradients as a fill pattern for a Bezier path or rectangle. If you need additional control over the final shape and appearance of the gradient fill, you can set up the clipping path your self and use the primitive drawing methods of NSGradient to do your drawing. Configuring the Colors of a Gradient Object The NSGradient class uses color stops to determine the position of color changes in its gradient fill. A color stop is a combination of an NSColor object and a floating-point number in the range 0.0 to 1.0. The floating point number represents the relative position of the associated color along the drawing axis of the gradient, which can be either radial or axial. By definition, gradients must have at least two color stops. Typically, these color stops represent the start and end points of the gradient. Although the start point is often located at 0.0 and the end point at 1.0, that may not always be the case. You can position the start and end points anywhere along the gradient’s drawing axis. As it creates the gradient, the gradient object fills the area prior to the start point with the start color and similarly fills the area after the end point with the end color. You can use the same gradient object to draw multiple gradient fills and you can freely mix the creation of radial and axial gradients using the same gradient object. Although you configure the colors of a gradient when you create the gradient object, you configure the drawing axis of the gradient only when you go to draw it. The NSGradient class definesthe following methodsfor configuring the colors and colorstops of a gradient. ● initWithStartingColor:endingColor: ● initWithColors: ● initWithColorsAndLocations: ● initWithColors:atLocations:colorSpace: Although you cannot change the colors of a gradient object after you initialize it, you can get information about the colors it contains using accessor methods. The numberOfColorStops method returns the number of colors that the gradient uses to draw itself and the getColor:location:atIndex: method retrieves the colorstop information for each of those colors. If you want to know what color would be drawn for the gradient in between two color stops, you can use the interpolatedColorAtLocation: method to get it. Drawing to a High-Level Path The NSGradient class defines several convenience methods for drawing both radial and axial gradients: ● drawInRect:angle: ● drawInRect:relativeCenterPosition: ● drawInBezierPath:angle: Advanced Drawing Techniques Creating Gradient Fills 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 115● drawInBezierPath:relativeCenterPosition: These convenience methods are easily identified by the fact that they take either an NSBezierPath or a rectangle as their first parameter. This parameter is used as a clipping region for the gradient when it is drawn. You might use these methods to draw a gradient fill inside an existing shape in your interface. Listing 6-2 shows some code that draws an axial gradient pattern. The NSBezierPath object containing the rounded rectangle shape acts as the clipping region for the gradient when it is drawn. Figure 6-3 (page 117) shows the resulting gradient. Listing 6-2 Clipping an axial gradient to a rounded rectangle - (void)drawRect:(NSRect)rect { NSRect bounds = [self bounds]; NSBezierPath* clipShape = [NSBezierPath bezierPath]; [clipShape appendBezierPathWithRoundedRect:bounds xRadius:40 yRadius:30]; NSGradient* aGradient = [[[NSGradient alloc] initWithColorsAndLocations:[NSColor redColor], (CGFloat)0.0, [NSColor orangeColor], (CGFloat)0.166, [NSColor yellowColor], (CGFloat)0.33, [NSColor greenColor], (CGFloat)0.5, [NSColor blueColor], (CGFloat)0.75, [NSColor purpleColor], (CGFloat)1.0, nil] autorelease]; [aGradient drawInBezierPath:clipShape angle:0.0]; Advanced Drawing Techniques Creating Gradient Fills 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 116} Figure 6-3 Axial gradient drawn inside a Bezier path Using the Primitive Drawing Routines In addition to the high-level convenience methods, the NSGradient class defines two primitive methods for drawing gradients: ● drawFromPoint:toPoint:options: ● drawFromCenter:radius:toCenter:radius:options: These methods give you more flexibility over the gradient parameters, including the ability to extend the gradient colors beyond theirstart and end points. Unlike the high-level routines, these methods do not change the clip region prior to drawing. If you do notset up a custom clip region prior to drawing, the resulting gradient could potentially expand to fill your entire view, depending on the gradient options. Listing 6-3 shows the code for drawing a radial gradient in a view using the primitive drawing routine of NSGradient. The second circle in the gradient is offset from the first one by 60 points in both the horizontal and vertical directions, causing the overall gradient to skew towards the upper-right of the circle. Because the code passes the value 0 for the options parameter, the gradient does not draw beyond the start and end colors and therefore does not fill the entire view. Figure 6-4 (page 118) shows the gradient resulting from this code. Listing 6-3 Drawing a radial gradient using primitive routine - (void)drawRect:(NSRect)rect { NSRect bounds = [self bounds]; NSGradient* aGradient = [[[NSGradient alloc] initWithStartingColor:[NSColor orangeColor] Advanced Drawing Techniques Creating Gradient Fills 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 117endingColor:[NSColor cyanColor]] autorelease]; NSPoint centerPoint = NSMakePoint(NSMidX(bounds), NSMidY(bounds)); NSPoint otherPoint = NSMakePoint(centerPoint.x + 60.0, centerPoint.y + 60.0); CGFloat firstRadius = MIN( ((bounds.size.width/2.0) - 2.0), ((bounds.size.height/2.0) -2.0) ); [aGradient drawFromCenter:centerPoint radius:firstRadius toCenter:otherPoint radius:5.0 options:0]; } Figure 6-4 Gradient created using primitive drawing method Using Quartz Shadings in Cocoa Because the NSGradient class is available only in OS X v10.5 and later, software that runs on earlier versions of OS X must use Quartz or Core Image to draw gradient fills. Quartz supports the creation of both radial and axial gradients in different color spaces using a mathematical computation function you provide. The use of a mathematical function means that the gradients you create using Quartz scale well to any resolution. Core Image, on the other hand, provides filters for creating a fixed-resolution image consisting of a radial, axial, or Gaussian gradient. Because the end result is an image, however, Core Image gradients may be less desirable for PDF and other print-based drawing. To draw a Quartz shading in your Cocoa program, you would do the following from your drawRect: method: 1. Get a CGContextRef using the graphicsPort method of NSGraphicsContext. (You will pass this reference to other Quartz functions.) 2. Create a CGShadingRef using Quartz; see “Gradients” in Quartz 2D Programming Guide . Advanced Drawing Techniques Creating Gradient Fills 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 1183. Configure the current clipping path to the desired shape for your shading; see “Setting the Clipping Region” (page 35). 4. Draw the shading using CGContextDrawShading. For information on using Core Image to create images with gradient fills, see Core Image Programming Guide . Drawing to the Screen If you want to take over the entire screen for your drawing, you can do so from a Cocoa application. Entering full-screen drawing mode is a two-step process: 1. Capture the desired screen (or screens) for drawing. 2. Configure your drawing environment. After capturing the screen, the way you configure your drawing environment depends on whether you are using Cocoa or OpenGL to draw. In OpenGL, you create an NSOpenGLContext object and invoke several of its methodsto enter full-screen mode. In Cocoa, you have to create a window that fillsthe screen and configure that window. Capturing the Screen Cocoa does not provide direct support for capturing and releasing screens. The NSScreen class provides read-only access to information about the available screens. To capture or manipulate a screen, you must use the functions found in Quartz Services. To capture all of the available screens, you can simply call the CGCaptureAllDisplays function. To capture an individual display, you must get the ID of the desired display and call the CGDisplayCapture function to capture it. The following example shows how to use information provided by an NSScreen object to capture the main screen of a system. - (BOOL) captureMainScreen { // Get the ID of the main screen. NSScreen* mainScreen = [NSScreen mainScreen]; NSDictionary* screenInfo = [mainScreen deviceDescription]; NSNumber* screenID = [screenInfo objectForKey:@"NSScreenNumber"]; // Capture the display. Advanced Drawing Techniques Drawing to the Screen 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 119CGDisplayErr err = CGDisplayCapture([screenID longValue]); if (err != CGDisplayNoErr) return NO; return YES; } To release a display you previously captured, use the CGDisplayRelease function. If you captured all of the active displays, you can release them all by calling the CGReleaseAllDisplays function. For more information about capturing and manipulating screens, see Quartz Display Services Reference . Full-Screen Drawing in OpenGL Applications that do full-screen drawing tend to be graphics intensive and thus use OpenGL to improve rendering speed. Creating a full-screen context using OpenGL is easy to do from Cocoa. After capturing the desired displays, create and configure an NSOpenGLContext object and then invoke its setFullScreen and makeCurrentContextmethods. Afterinvoking thesemethods, your application goesimmediately to full-screen mode and you can start drawing content. When requesting a full-screen context in OpenGL, the pixel format for your contextshould include the following attributes: ● NSOpenGLPFAFullScreen ● NSOpenGLPFAScreenMask ● NSOpenGLPFAAccelerated ● NSOpenGLPFANoRecovery (only if your OpenGL graphics context is shared) Listing 6-4 shows the basic steps for capturing all displays and setting up the OpenGL context for full-screen drawing. For information on how to create an NSOpenGLContext object, see “Creating an OpenGL Graphics Context” (page 166). Listing 6-4 Creating an OpenGL full-screen context NSOpenGLContext* CreateScreenContext() { CGDisplayErr err; Advanced Drawing Techniques Drawing to the Screen 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 120err = CGCaptureAllDisplays(); if (err != CGDisplayNoErr) return nil; // Create the context object. NSOpenGLContext* glContext = CreateMyGLContext(); // If the context is bad, release the displays. if (!glContext) { CGReleaseAllDisplays(); return nil; } // Go to full screen mode. [glContext setFullScreen]; // Make this context current so that it receives OpenGL calls. [glContext makeCurrentContext]; return glContext; } Once you go into full-screen mode with your graphics context, your application has full control of the screen. To exit full-screen mode, invoke the clearDrawable method of your OpenGL context and call the CGReleaseAllDisplays function to release the screens back to the system. For detailed sample code showing you how to enter full-screen mode using OpenGL and Cocoa, see the NSOpenGL Fullscreen sample in Sample Code > Graphics & Imaging > OpenGL. Full-Screen Drawing in Cocoa All Cocoa drawing occurs in a window, but for full screen drawing, the window you create is a little different. Instead of a bordered window with a title bar, you need to create a borderless window that spans the entire screen area. Advanced Drawing Techniques Drawing to the Screen 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 121Although you create a full-screen window using Cocoa classes, you still have to use Quartz Services to capture the display and configure the window properly. The capture processis described in “Capturing the Screen” (page 119). Once you capture the screen, the window server puts up a shield window that hides most other content. To make your full-screen window visible, you must adjust its level to sit above this shield. You can get the shield level using the CGShieldingWindowLevel function and pass the returned value to the setLevel: method of your window. Listing 6-5 shows an action method defined in a subclass of NSDocument. The document object uses this method to capture the main display and create the window to fill thatscreen space. The window itself contains a single view (of type MyFullScreenView) for drawing content. (In your own code, you would replace this view with your own custom drawing view.) A reference to the window is stored in the myScreenWindow class instance variable, which is initialized to nil when the class is first instantiated. Listing 6-5 Creating a Cocoa full-screen context - (IBAction)goFullScreen:(id)sender { // Get the screen information. NSScreen* mainScreen = [NSScreen mainScreen]; NSDictionary* screenInfo = [mainScreen deviceDescription]; NSNumber* screenID = [screenInfo objectForKey:@"NSScreenNumber"]; // Capture the screen. CGDirectDisplayID displayID = (CGDirectDisplayID)[screenID longValue]; CGDisplayErr err = CGDisplayCapture(displayID); if (err == CGDisplayNoErr) { // Create the full-screen window if it doesn’t already exist. if (!myScreenWindow) { // Create the full-screen window. NSRect winRect = [mainScreen frame]; myScreenWindow = [[NSWindow alloc] initWithContentRect:winRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO screen:[NSScreen mainScreen]]; Advanced Drawing Techniques Drawing to the Screen 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 122// Establish the window attributes. [myScreenWindow setReleasedWhenClosed:NO]; [myScreenWindow setDisplaysWhenScreenProfileChanges:YES]; [myScreenWindow setDelegate:self]; // Create the custom view for the window. MyFullScreenView* theView = [[MyFullScreenView alloc] initWithFrame:winRect]; [myScreenWindow setContentView:theView]; [theView setNeedsDisplay:YES]; [theView release]; } // Make the screen window the current document window. // Be sure to retain the previous window if you want to use it again. NSWindowController* winController = [[self windowControllers] objectAtIndex:0]; [winController setWindow:myScreenWindow]; // The window has to be above the level of the shield window. int32_t shieldLevel = CGShieldingWindowLevel(); [myScreenWindow setLevel:shieldLevel]; // Show the window. [myScreenWindow makeKeyAndOrderFront:self]; } } To exit full screen mode using Cocoa, simply release the captured display, resize your window so that it does not occupy the entire screen, and set its level back to NSNormalWindowLevel. For more information about the shield window, see Quartz Display Services Reference . Advanced Drawing Techniques Drawing to the Screen 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 123Disabling Screen Updates You can disable and reenable all screen flushes using the NSDisableScreenUpdates and NSEnableScreenUpdates functions. (In OS X v10.4 and later, you can also use the disableScreenUpdatesUntilFlush method of NSWindow.) You can use this technique to synchronize flushes to both a parent and child window. As soon as you reenable screen updates, all windows are flushed simultaneously (or at least close to it). To prevent the system from appearing frozen, the system may automatically reenable screen updates if your application leaves them disabled for a prolonged period of time. If you leave screen updates disabled for more than 1 second, the system automatically reenables them. Using NSTimer for Animated Content By default, Cocoa sends a drawRect: message to your views only when a user action causes something to change. If your view contains animated content, you probably want to update that content at more regular intervals. For both indeterminate-length and finite-length animations, you can do this using timers. Note: For finite-length animations, you can also use an NSAnimation object to control the animation timing. For more information, see “Using Cocoa Animation Objects” (page 125). The NSTimer class provides a mechanism for generating periodic events in your application. When a preset time is reached, the timer object sends a message to your application, giving you the chance to perform any desired actions. For animations, you would use a timer to tell your application that it is time to draw the next frame. There are two steps involved with getting a timer to run. The first step is to create the NSTimer object itself and specify the object to notify, the message to send, the time interval for the notification, and whether the timer repeats. The second step is to install that timer object on the run loop of your thread. The methods scheduledTimerWithTimeInterval:invocation:repeats: and scheduledTimerWithTimeInterval:target:selector:userInfo:repeats: perform both of these steps for you. Other methods of NSTimer create the timer but do not install it on the run loop. For information and examples on how to create and use timers, see Timer Programming Topics. Advanced Drawing Techniques Using NSTimer for Animated Content 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 124Using Cocoa Animation Objects The NSAnimation and NSViewAnimation classes provide sophisticated behavior for animations that occur over a finite length of time. OS X uses animation objects to implement transition animations for user interface elements. You can define custom animation objects to implement animations for your own code. Unlike NSTimer, animation notifications can occur at irregular intervals, allowing you to create animationsthat appear to speed up or slow down. For information about how to use Cocoa animation objects, see Animation Programming Guide for Cocoa . Optimizing Your Drawing Code The following sections provide some basic guidance for improving the overall performance of your drawing code. These are the things that you should definitely be doing in your code. For a more comprehensive list of drawing optimization techniques, see Drawing Performance Guidelines. Draw Minimally Even with modern graphics hardware, drawing is still an expensive operation. The best way to reduce the amount of time spent in your drawing code is to draw only what is needed in the first place. During a view update, the drawRect: method receives a rectangle that specifies the portion of the view that needs to be updated. This rectangle is always limited to the portion of the view that is currently visible and in some cases may be even smaller. Your drawing code should pay attention to this rectangle and avoid drawing content outside of it. Because the rectangle passed to drawRect: might be a union ofseveralsmaller rectangles, an even better approach is to call the view’s getRectsBeingDrawn:count: method and constrain your drawing to the exact list of rectangles returned by that method. Avoid Forcing Synchronous Updates When invalidating portions of your views, you should avoid using the display family of methods to force an immediate update. These methods cause the system to send a drawRect: message to the affected view (and potentially other views in the hierarchy) immediately rather than wait until the next regular update cycle. If there are several areas to update, this may result in a lot of extra work for your drawing code. Instead, you should use the setNeedsDisplay: and setNeedsDisplayInRect: methods to mark areas as needing an update. When you call these methods, the system collects the rectangles you specify and coalesces them into a combined update region, which it then draws during the next update cycle. Advanced Drawing Techniques Using Cocoa Animation Objects 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 125If you are creating animated content, you should also be careful not to trigger visual updates more frequently than the screen refresh rate allows. Updating faster than the refresh rate results in your code drawing frames that are never seen by the user. In addition, updating faster than the refresh rate is not allowed in OS X v10.4 and later. If you try to update the screen faster than the refresh rate, the window server may block the offending thread until the next update cycle. Reuse Your Objects If you have objects that you plan to use more than once, consider caching them for later use. Caching saves time by eliminating the need to recreate objects each time you want to draw them. Of course, caching requires more memory, so be judicious about what you cache. It is faster to recreate an object in memory than page it in from disk. Many objects are cached automatically by Cocoa and do not need to be cached in your own code. For example, Cocoa caches NSColor objects representing commonly used colors as those colors are requested. Minimize State Changes Every time you save the graphics state, you incur a small performance penalty. Whenever you have objects with the same rendering attributes, try to draw them all at the same time. If you save and restore the graphics state for each object, you may waste some CPU cycles. With Cocoa, methods and functions that draw right away usually involve a change in graphics state. For example, when you call the stroke method of NSBezierPath, the object automatically saves the graphics state and appliesthe options associated with that path. While you are building the path, however, the graphics state does not change. Thus, if you want to draw several shapes using the same graphics attributes, it is advantageous to fill a single NSBezierPath with all of the shapes and then draw them all as a group. Note: There is a tradeoff between creating larger, more complex Bezier paths and using individual objects for each shape you want to draw. As path complexity increases, so do the number of calculations required to determine fill characteristics and to perform hit detection—see “Reduce Path Complexity” (page 155). When creating Bezier paths, you need to find an appropriate balance between path complexity and graphics state changes. Advanced Drawing Techniques Optimizing Your Drawing Code 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 126Text rendering is a special type of drawing that is an important part of most applications. Cocoa provides a range of options for rendering text that should satisfy the needs of most developers. The following sections cover these options briefly. For more detailed information, you should see the documents in Reference Library > Cocoa > Text & Fonts. Text Attributes Cocoa provides support for programmatically getting font information using the NSFont class. You can apply fonts as attributes to strings or use them to set the default font in the current context. The Cocoa text system also uses font objects for formatting text. You request NSFont objects from Cocoa using the name and size of the font you want, as shown in the following example. NSFont* font1= [NSFont fontWithName:@"Helvetica" size:9.0]; NSFont* font2 = [NSFont fontWithName:@"Helvetica Bold" size:10.0]; The NSFont class does not provide a programmatic way to modify other text attributes, such as the character spacing and text drawing mode. Cocoa does, however, provide a system Font panel that you can display to the user. From this panel, the user can make changes to the current font attributes. You can also set most text options using the Cocoa text system, which is described in “Advanced Text Drawing” (page 128). Although you usually specify font attributes directly when drawing NSString and NSAttributedString objects, you can also change the font and font size information in the current graphics state. To change these values, you create an NSFont object and invoke its set method. For information about working with fonts and font objects, see Font Handling . For information about how to display the Font panel, see Font Panel Programming Topics. 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 127 TextSimple Text Drawing If you need to draw a small amount of text quickly, the simplest way to do it is using the methods of NSString and NSAttributedString. The Application Kit defines methods on these classes that support drawing the string in the current context. For an NSString object, you can apply basic attributes (such as font, color, and style settings) to the entire string during drawing. For an NSAttributedString object, you can apply multiple sets of attributes to different parts of the string. Prior to OS X v10.4, the NSString and NSAttributedString classes were intended for rendering text occasionally in your program. The performance of these drawing methods was not as good asthe performance you could get by rendering text using the Cocoa text system. Also, the layout for strings is limited to a simple rectangular area in the current view. In OS X v10.4, performance of the string drawing methods improved significantly and is useful in many situations; of course, you should always measure the performance yourself and see if it is adequate for your program. If you need to do more complex text layout, you should still consider using the Cocoa text system. For information on string drawing methods, see NSString Application Kit Additions Reference or NSAttributedString Application Kit Additions Reference in Application Kit Framework Reference . Advanced Text Drawing If your program displays a lot of text or needs to arrange text in complex ways, you should use the Cocoa text system. This system provides advanced text-handling capabilities on top of basic features such as text input, layout, display, editing, copying, and pasting. The system supports multiple fonts and paragraph styles, embedded images, spell checking, nonrectangular text containers, and sophisticated typesetting features, among many other features. Text layout is one of the most expensive drawing-related operations you can do and the Cocoa text system is optimized for the best possible performance. The text system manages a sophisticated set of caches and optimizes the times at which it performs layout to reduce the impact on your program’s drawing cycle. Of course, these optimizations work only if your program reuses its text objects, but doing so is relatively simple. The simplest way to use the Cocoa text system is to place an NSTextView object in one of your windows. A text view object creates and maintainsthe text layout objectsit needsto draw text and respondsto user events to modify the text. If you want to have more control over the text layout and editing behavior, you can tie into the Cocoa text system at several places. The text engine at the heart of the Cocoa text system is highly customizable. You can subclass several text system classes to provide custom layout and typesetting behavior. You can also create your own text-based views to provide features beyond what the default NSTextView offers. Text Simple Text Drawing 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 128For information about the Cocoa text system, you should start by reading Cocoa Text Architecture Guide . That document describes the basic concepts of the text system and introduces you to many of the classes involved in text layout and management. It also provides simple tutorials to get you started and pointers to other text-related documents. Text Advanced Text Drawing 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 129Cocoa provides support for drawing simple or complex geometric shapes using paths. A path is a collection of points used to create primitive shapes such as lines, arcs, and curves. From these primitives, you can create more complex shapes, such as circles, rectangles, polygons, and complex curved shapes, and paint them. Because they are composed of points(as opposed to a rasterized bitmap), paths are lightweight, fast, and scale to different resolutions without losing precision or quality. The following sectionsfocus primarily on the use of the NSBezierPath class, which providesthe main interface for creating and manipulating paths. Cocoa also provides a handful of functions that offer similar behavior for creating and drawing paths but do not require the overhead of creating an object. Those functions are mentioned where appropriate, but for more information,see Foundation Framework Reference and Application Kit Framework Reference . Path Building Blocks Cocoa defines several fundamental data types for manipulating geometric information in the drawing environment. These data types include NSPoint, NSRect, and NSSize. You use these data types to specify lines, rectangles, and width and height information for the shapes you want to draw. Everything from lines and rectangles to circles, arcs, and Bezier curves can be specified using one or more of these data structures. The coordinate values for point, rectangle, and size data types are all specified using floating-point values. Floating-point values allow for much finer precision asthe resolution of the underlying destination device goes up. The NSPoint, NSRect, and NSSize data types have equivalentsin the Quartz environment: CGPoint, CGRect, and CGSize. Because the layout of the Cocoa and Quartz types are identical, you can convert between two types by casting from one type to its counterpart. 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 130 PathsThe NSBezierPath Class The NSBezierPath class provides the behavior for drawing most primitive shapes, and for many complex shapes, it isthe only tool available in Cocoa. An NSBezierPath object encapsulatesthe information associated with a path, including the pointsthat define the path and the attributesthat affect the appearance of the path. The following sections explain how NSBezierPath represents path information and also describe the attributes that affect a path’s appearance. Path Elements An NSBezierPath object uses path elementsto build a path. A path element consists of a primitive command and one or more points. The command tells the path object how to interpret the associated points. When assembled, a set of path elements creates a series of line segments that form the desired shape. The NSBezierPath class handles much of the work of creating and organizing path elementsinitially. Knowing how to manipulate path elements becomes important, however, if you want to make changes to an existing path. If you create a complex path based on user input, you might want to give the user the option of changing that path later. Although you could create a new path object with the changes, it is far simpler to modify the existing path elements. (For information on how to modify path elements, see “Manipulating Individual Path Elements” (page 156).) The NSBezierPath class defines only four basic path element commands, which are listed in Table 8-1. These commands are enough to define all of the possible path shapes. Each command has one or more points that contain information needed to position the path element. Most path elements use the current drawing point as the starting point for drawing. Table 8-1 Path element commands Number Description of points Command Movesthe path object’s current drawing point to the specified point. This path element does not result in any drawing. Using this command in the middle of a path resultsin a disconnected line segment. NSMoveToBezier- 1 PathElement Creates a straight line from the current drawing point to the specified point. Lines and rectangles are specified using this path element. NSLineToBezier- 1 PathElement Paths The NSBezierPath Class 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 131Number Description of points Command Creates a curved line segment from the current point to the specified endpoint using two control pointsto define the curve. The points are stored in the following order: controlPoint1, controlPoint2, endPoint. Ovals, arcs, and Bezier curves all use curve elements to specify their geometry. NSCurveToBezier- 3 PathElement Marks the end of the current subpath at the specified point. (Note that the point specified for the Close Path element is essentially the same as the current point. NSClosePathBezier- 1 PathElement When you add a new shape to a path, NSBezierPath breaks that shape down into one or more component path elements for storage purposes. For example, calling moveToPoint: or lineToPoint: creates a Move To element or Line To element respectively. In the case of more complex shapes, like rectangles and ovals, several line or curve elements may be created. Figure 8-1 shows two shapes and the resulting path elements. For the curved segment, the figure also shows the control points that define the curve. Figure 8-1 Path elements for a complex path Listing 8-1 shows the code that creates the path shown in Figure 8-1. Paths The NSBezierPath Class 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 132Listing 8-1 Creating a complex path NSBezierPath* aPath = [NSBezierPath bezierPath]; [aPath moveToPoint:NSMakePoint(0.0, 0.0)]; [aPath lineToPoint:NSMakePoint(10.0, 10.0)]; [aPath curveToPoint:NSMakePoint(18.0, 21.0) controlPoint1:NSMakePoint(6.0, 2.0) controlPoint2:NSMakePoint(28.0, 10.0)]; [aPath appendBezierPathWithRect:NSMakeRect(2.0, 16.0, 8.0, 5.0)]; Subpaths A subpath is a series of connected line and curve segments within an NSBezierPath object. A single path object may contain multiple subpaths, with each subpath delineated by a Move To or Close Path element. When you set the initial drawing point (typically using the moveToPoint: method), you set the starting point of the first subpath. As you draw, you build the contents of the subpath until you either close the path (using the closePath method) or add another Move To element. At that point, the subpath is considered closed and any new elements are added to a new subpath. Some methods of NSBezierPath automatically create a new subpath for you. For example, creating a rectangle or oval results in the addition of a Move To element, several drawing elements, and a Close Path and Move To element (see Figure 8-1 (page 132) for an example). The Move To element at the end of the list of elements ensures that the current drawing point is left in a known location, which in this case is at the rectangle’s origin point. Subpaths exist to help you distinguish different parts of a path object. For example, subpaths affect the way a path is filled; see “Winding Rules” (page 141). The division of a path into subpaths also affects methods such as bezierPathByReversingPath, which reversesthe subpaths one at a time. In other cases, though,subpaths in an NSBezierPath object share the same drawing attributes. Path Attributes An NSBezierPath object maintains all of the attributes needed to determine the shape of its path. These attributes include the line width, curve flatness, line cap style, line join style, and miter limit of the path. You set these values using the methods of NSBezierPath. Paths The NSBezierPath Class 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 133Path attributes do not take effect until you fill or stroke the path, so if you change an attribute more than once before drawing the path, only the last value is used. The NSBezierPath class maintains both a custom and default version of each attribute. Path objects use custom attribute values if they are set. If no custom attribute value is set for a given path object, the default value is used. The NSBezierPath class does not use path attribute values set using Quartz functions. Note: Path attributes apply to the entire path. If you want to use different attributes for different parts of a path, you must create two separate path objects and apply the appropriate attributes to each. The following sections describe the attributes you can set for a path object and how those attributes affect your rendered paths. Line Width The line width attribute controls the width of the entire path. Line width is measured in points and specified as a floating-point value. The default width for all lines is 1. To change the default line width for all NSBezierPath objects, you use the setDefaultLineWidth: method. To set the line width for the current path object, you use the setLineWidth: method of that path object. To set the default line width for shapes rendered without an NSBezierPath object, you must use the CGContextSetLineWidth function in Quartz. Fractional line widths are rendered as close as possible to the specified width, subject to the limitations of the destination device, the position of the line, and the current anti-aliasing setting. For example, suppose you want to draw a line whose width is 0.2 points. Multiplying this width by 1/72 points per inch yields a line that is 0.0027778 inches wide. On a 90 dpi screen, the smallest possible line would be 1 pixel wide or 0.0111 inches. To ensure your line is not hidden on the screen, Cocoa nominally drawsit at the screen’slarger minimum width (0.0111 inches). In reality, if the line straddles a pixel boundary or anti-aliasing is enabled, the line might affect additional pixels on either side of the path. If the output device were a 600 dpi printer instead, Quartz would be able to render the line closer to its true width of 0.0027778 inches. Listing 8-2 draws a few paths using different techniques. The NSFrameRect function uses the default line width to draw a rectangle, so that value must be set prior to calling the function. Path objects use the default value only if a custom value has not been set. You can even change the line width of a path object and draw again to achieve a different path width, although you would also need to move the path to see the difference. Listing 8-2 Setting the line width of a path // Draw a rectangle using the default line width: 2.0. [NSBezierPath setDefaultLineWidth:2.0]; Paths The NSBezierPath Class 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 134NSFrameRect(NSMakeRect(20.0, 20.0, 10.0, 10.0)); // Set the line width for a single NSBezierPath object. NSBezierPath* thePath = [NSBezierPath bezierPath]; [thePath setLineWidth:1.0]; // Has no effect. [thePath moveToPoint:NSMakePoint(0.0, 0.0)]; [thePath lineToPoint:NSMakePoint(10.0, 0.0)]; [thePath setLineWidth:3.0]; [thePath lineToPoint:NSMakePoint(10.0, 10.0)]; // Because the last value set is 3.0, all lines are drawn with // a width of 3.0, not just the second line. [thePath stroke]; // Changing the width and stroking again draws the same path // using the new line width. [thePath setLineWidth:4.0]; [thePath stroke]; // Changing the default line width has no effect because a custom // value already exists. The path is rendered with a width of 4.0. [thePath setDefaultLineWidth:5.0]; [thePath stroke]; Line Cap Styles The current line cap style determinesthe appearance of the open end points of a path segment. Cocoa supports the line cap styles shown in Figure 8-2. Figure 8-2 Line cap styles Paths The NSBezierPath Class 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 135To set the line cap style for a NSBezierPath object, use the setLineCapStyle: method. The default line cap style is set to NSButtLineCapStyle. To change the default line cap style, use the setDefaultLineCapStyle: method. Listing 8-3 demonstrates both of these methods: Listing 8-3 Setting the line cap style of a path [// Set the default line cap style [NSBezierPath setDefaultLineCapStyle:NSButtLineCapStyle]; // Customize the line cap style for the new object. NSBezierPath* aPath = [NSBezierPath bezierPath]; [aPath moveToPoint:NSMakePoint(0.0, 0.0)]; [aPath lineToPoint:NSMakePoint(10.0, 10.0)]; [aPath setLineCapStyle:NSSquareLineCapStyle]; [aPath stroke]; Line Join Styles The current line join style determines how connected lines in a path are joined at the vertices. Cocoa supports the line join styles shown in Figure 8-3. Figure 8-3 Line join styles To set the line join style for an NSBezierPath object, use the setLineJoinStyle: method. The default line join style is set to NSMiterLineJoinStyle. To change the default line join style, use the setDefaultLineJoinStyle: method. Listing 8-4 demonstrates both of these methods: Paths The NSBezierPath Class 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 136Listing 8-4 Setting the line join style of a path [// Set the default line join style [NSBezierPath setDefaultLineJoinStyle:NSMiterLineJoinStyle]; // Customize the line join style for a new path. NSBezierPath* aPath = [NSBezierPath bezierPath]; [aPath moveToPoint:NSMakePoint(0.0, 0.0)]; [aPath lineToPoint:NSMakePoint(10.0, 10.0)]; [aPath lineToPoint:NSMakePoint(10.0, 0.0)]; [aPath setLineJoinStyle:NSRoundLineJoinStyle]; [aPath stroke]; Line Dash Style The line dash style determines the pattern used to stroke a path. By default, stroked paths appear solid. Using a line-dash pattern, you can specify an alternating group of solid and transparent swatches. When setting a line dash pattern, you specify the width (in points) of each successive solid or transparent swatch. The widths you specify are then repeated over the entire length of the path. Figure 8-4 shows some sample line dash patterns, along with the values used to create each pattern. Figure 8-4 Line dash patterns The NSBezierPath class does not support the concept of a default line dash style. If you want a line dash style, you must apply it to a path explicitly using the setLineDash:count:phase: method as shown in Listing 8-5, which renders the last pattern from the preceding figure. Listing 8-5 Adding a dash style to a path void AddDashStyleToPath(NSBezierPath* thePath) { Paths The NSBezierPath Class 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 137// Set the line dash pattern. float lineDash[6]; lineDash[0] = 40.0; lineDash[1] = 12.0; lineDash[2] = 8.0; lineDash[3] = 12.0; lineDash[4] = 8.0; lineDash[5] = 12.0; [thePath setLineDash:lineDash count:6 phase:0.0]; } Line Flatness The line flatness attribute determinesthe rendering accuracy for curved segments. The flatness value measures the maximum error tolerance (in pixels) to use during rendering. Smaller values result in smoother curves but require more computation time. Larger values result in more jagged curves but are rendered much faster. Line flatness is one parameter you can tweak when you want to render a large number of curves quickly and do not care about accuracy. For example, you might increase this value during a live resize orscrolling operation when accuracy is not as crucial. Regardless, you should always measure performance to make sure such a modification actually saves time. Figure 8-5 shows how changing the default flatness affects curved surfaces. The figure on the left shows a group of curved surfaces rendered with the flatness value set to 0.6 (its default value). The figure on the right shows the same curved surfaces rendered with the flatness value set to 20. The curvature of each surface is lost and now appears to be a set of connected line segments. Figure 8-5 Flatness effects on curves Paths The NSBezierPath Class 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 138To set the flatness for a specific NSBezierPath object, use the setFlatness: method. To set the default flatness value, use setDefaultFlatness:, as shown in Listing 8-6: Listing 8-6 Setting the flatness of a path [- (void) drawRect:(NSRect)rect { if ([self inLiveResize]) { // Adjust the default flatness upward to reduce // the number of required computations. [NSBezierPath setDefaultFlatness:10.0]; // Draw live resize content. } // ... } Miter Limits Miter limits help you avoid spikes that occur when you join two line segments at a sharp angle. If the ratio of the miter length—the diagonal length of the miter—to the line thickness exceeds the miter limit, the corner is drawn using a bevel join instead of a miter join. Paths The NSBezierPath Class 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 139Note: Miter limits apply only to paths rendered using the miter join style. Figure 8-6 shows an example of how different miter limits affect the same path. This path consists of several 10-point wide lines connected by miter joins. In the figure on the left, the miter limit is set to 5. Because the miter lengths exceed the miter limit, the line joins are changed to bevel joins. By increasing the miter limit to 16, as shown in the figure on the right, the miter joins are restored but extend far beyond the point where the two lines meet. Figure 8-6 Miter limit effects To set the miter limits for a specific NSBezierPath object, use the setMiterLimit: method. To set the default miter limit for newly created NSBezierPath objects, use setDefaultMiterLimit:. Listing 8-7 demonstrates both of these methods: Listing 8-7 Setting the miter limit for a path // Increase the default limit [NSBezierPath setDefaultMiterLimit:20.0]; // Customize the limit for a specific path with sharp angles. NSBezierPath* aPath = [NSBezierPath bezierPath]; [aPath moveToPoint:NSMakePoint(0.0, 0.0)]; [aPath lineToPoint:NSMakePoint(8.0, 100.0)]; [aPath lineToPoint:NSMakePoint(16.0, 0.0)]; [aPath setLineWidth:5.0]; [aPath setMiterLimit:5.0]; Paths The NSBezierPath Class 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 140[aPath stroke]; Winding Rules When you fill the area encompassed by a path, NSBezierPath applies the current winding rule to determine which areas of the screen to fill. A winding rule is simply an algorithm that tracks information about each contiguous region that makes up the path's overall fill area. A ray is drawn from a point inside a given region to any point outside the path bounds. The total number of crossed path lines (including implicit lines) and the direction of each path line are then interpreted using the rules in Table 8-2, which determine if the region should be filled. Table 8-2 Winding rules Winding rule Description Count each left-to-right path as +1 and each right-to-left path as -1. If the sum of all crossings is 0, the point is outside the path. If the sum is nonzero, the point isinside the path and the region containing it isfilled. This is the default winding rule. NSNonZeroWindingRule Count the total number of path crossings. If the number of crossings is even, the point is outside the path. If the number of crossings is odd, the point is inside the path and the region containing it should be filled. NSEvenOddWindingRule Fill operations are suitable for use with both open and closed subpaths. A closed subpath is a sequence of drawing calls that ends with a Close Path path element. An open subpath ends with a Move To path element. When you fill a partial subpath, NSBezierPath closes it for you automatically by creating an implicit (non-rendered) line from the first to the last point of the subpath. Paths The NSBezierPath Class 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 141Figure 8-7 shows how the winding rules are applied to a particular path. Subfigure a shows the path rendered using the nonzero rule and subfigure b shows it rendered using the even-odd rule. Subfigures c and d add direction marks and the hidden path line that closes the figure to help you see how the rules are applied to two of the path’s regions. Figure 8-7 Applying winding rules to a path To set the winding rule for an NSBezierPath object, use the setWindingRule: method. The default winding rule is NSNonZeroWindingRule. To change the default winding rule for all NSBezierPath objects, use the setDefaultWindingRule: method. Manipulating Geometric Types The Foundation framework includes numerousfunctionsfor manipulating geometric values and for performing various calculations using those values. In addition to basic equality checks, you can perform more complex operations,such asthe union and intersection of rectangles or the inclusion of a point in a rectangle’s boundaries. Table 8-3 listssome of the more commonly used functions and their behaviors. The function syntax is provided in a shorthand notation, with parameter types omitted to demonstrate the calling convention. For a complete list of available functions, and their full syntax, see the Functions section in Foundation Framework Reference . Paths Manipulating Geometric Types 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 142Table 8-3 Commonly used geometry functions Operation Function Description Returns a properly formatted NSPoint data structure with the specified x and y values. NSPoint NSMakePoint(x, y) Creation Returns a properly formatted NSSize data structure with the specified width and height. NSSize NSMakeSize(w, h) Returns a properly formatted NSRect data structure with the specified origin (x, y) and size (width, height). NSRect NSMakeRect(x, y, w, h) BOOL NSEqualPoints(p1, Returns YES if the two points are the same. p2) Equality Returns YES if the two size types have identical widths and heights. BOOL NSEqualSizes(s1, s2) Returns YES, if the two rectangles have the same origins and the same widths and heights. BOOL NSEqualRects(r1, r2) Returns YES if rectangle 1 completely encloses rectangle 2. BOOL NSContainsRect(r1, r2) Rectangle manipulations Returns a copy of the specified rectangle with its sides moved inward by the specified delta values. Negative delta values move the sides outward. Does not modify the original rectangle. NSRect NSInsetRect(r, dX, dY) NSRect Returns the intersection of the two rectangles. NSIntersectionRect(r1, r2) NSRect NSUnionRect(r1, Returns the union of the two rectangles. r2) Tests whether the point lies within the specified view rectangle. Adjusts the hit-detection algorithm to provide consistent behavior from the user’s perspective. BOOL NSMouseInRect(p, r, flipped) Tests whether the point lies within the specified rectangle. This is a basic mathematical comparison. BOOL NSPointInRect(p, r) Paths Manipulating Geometric Types 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 143Drawing Fundamental Shapes For many types of content, path-based drawing has several advantages over image-based drawing: ● Because paths are specified mathematically, they scale easily to different resolutions. Thus, the same path objects can be used for screen and print-based drawing. ● The geometry information associated with a path requires much less storage space than most image data formats. ● Rendering paths is often faster than compositing a comparable image. It takes less time to transfer path data to the graphics hardware than it takes to transfer the texture data associated with an image. The following sections provide information about the primitive shapes you can draw using paths. You can combine one or more of these shapesto create a more complex path and then stroke or fill the path as described in “Drawing the Shapes in a Path” (page 152). For some shapes, there may be more than one way to add the shape to a path, or there may be alternate waysto draw the shape immediately. Wherever possible, the benefits and disadvantages of each technique are listed to help you decide which technique is most appropriate in specific situations. Adding Points An NSPoint structure by itself represents a location on the screen; it has no weight and cannot be drawn as such. To draw the equivalent of a point on the screen, you would need to create a small rectangle at the desired location, as shown in Listing 8-8. Listing 8-8 Drawing a point void DrawPoint(NSPoint aPoint) { NSRect aRect = NSMakeRect(aPoint.x, aPoint.y, 1.0, 1.0); NSRectFill(aRect); } Of course, a more common use for points is to specify the position of other shapes. Many shapes require you to specify the current point before actually creating the shape. You set the current point using the moveToPoint: or relativeMoveToPoint: methods. Some shapes, like rectangles and ovals, already contain location information and do not require a separate call to moveToPoint:. Paths Drawing Fundamental Shapes 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 144Important: You must specify a starting point before drawing individual line, arc, curve, and glyph paths. If you do not, NSBezierPath raises an exception. Adding Lines and Polygons Cocoa provides a couple of options for adding lines to a path, with each technique offering different tradeoffs between efficiency and correctness. You can draw lines in the following ways: ● Create single horizontal and vertical lines by filling a rectangle using NSRectFill. This technique is less precise but is often a little faster than creating an NSBezierPath object. To create diagonal lines using this technique, you must apply a rotation transform before drawing. This technique is not appropriate for creating connected line segments. ● Use the lineToPoint:, relativeLineToPoint:, or strokeLineFromPoint:toPoint: methods of NSBezierPath to create individual or connected line segments. This technique is fast and is the most precise option for creating lines and complex polygons. ● Use the appendBezierPathWithPoints:count: method to create a series of connected lines quickly. This technique is faster than adding individual lines. Polygons are composed of multiple connected lines and should be created using an NSBezierPath object. The simplest way to create a four-sided nonrectangular shape, like a parallelogram, rhombus, or trapezoid, is using line segments. You could also create these shapes using transforms, but calculating the correct skew factors would require a lot more work. Listing 8-9 shows code to draw a parallelogram using NSBezierPath. The method in this example inscribes the parallelogram inside the specified rectangle. The withShift parameter specifies the horizontal shift applied to the top left and bottom right corners of the rectangular area. Listing 8-9 Using lines to draw a polygon void DrawParallelogramInRect(NSRect rect, float withShift) { NSBezierPath* thePath = [NSBezierPath bezierPath]; [thePath moveToPoint:rect.origin]; [thePath lineToPoint:NSMakePoint(rect.origin.x + withShift, NSMaxY(rect))]; [thePath lineToPoint:NSMakePoint(NSMaxX(rect), NSMaxY(rect))]; [thePath lineToPoint:NSMakePoint(NSMaxX(rect) - withShift, rect.origin.y)]; [thePath closePath]; Paths Drawing Fundamental Shapes 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 145[thePath stroke]; } Adding Rectangles Because rectangles are used frequently, there are several options for drawing them. ● Use the methods of NSBezierPath to create your rectangle. The following methods are reasonably fast and offer the best precision: ● strokeRect: ● fillRect: ● bezierPathWithRect: ● appendBezierPathWithRect: ● Create rectangles using the Cocoa functions described in “Drawing Rectangles” (page 152). These functions draw rectangles faster than, but with less precision than, the methods of NSBezierPath. ● Create a rectangle using individual lines as described in “Adding Lines and Polygons” (page 145). You could use thistechnique to create diagonally oriented rectangles—that is, rectangles whose sides are not parallel to the x and y axes—without using a rotation transform. Listing 8-10 shows a simple function that fills and strokes the same rectangle using two different techniques. The current fill and stroke colors are used when drawing the rectangle, along with the default compositing operation. In both cases, the rectangles are drawn immediately; there is no need to send a separate fill or stroke message. Listing 8-10 Drawing a rectangle void DrawRectangle(NSRect aRect) { NSRectFill(aRect); [NSBezierPath strokeRect:aRect]; } Adding Rounded Rectangles InOS X v10.5 and later, the NSBezierPath classincludesthe following methodsfor creating rounded-rectangles: Paths Drawing Fundamental Shapes 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 146● bezierPathWithRoundedRect:xRadius:yRadius: ● appendBezierPathWithRoundedRect:xRadius:yRadius: These methods create rectangles whose corners are curved according to the specified radius values. The radii describe the width and height of the oval to use at each corner of the rectangle. Figure 8-8 shows how this inscribed oval is used to define the path of the rectangle’s corner segments. Figure 8-8 Inscribing the corner of a rounded rectangle Listing 8-11 shows a code snippet that creates and draws a path with a rounded rectangle. Listing 8-11 Drawing a rounded rectangle void DrawRoundedRect(NSRect rect, CGFloat x, CGFloat y) { NSBezierPath* thePath = [NSBezierPath bezierPath]; [thePath appendBezierPathWithRoundedRect:rect xRadius:x yRadius:y]; [thePath stroke]; } Adding Ovals and Circles To draw ovals and circles, use the following methods of NSBezierPath: ● bezierPathWithOvalInRect: ● appendBezierPathWithOvalInRect: Paths Drawing Fundamental Shapes 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 147Both methods inscribe an oval inside the rectangle you specify. You must then fill or stroke the path object to draw the oval in the current context. The following example creates an oval from the specified rectangle and strokes its path. void DrawOvalInRect(NSRect ovalRect) { NSBezierPath* thePath = [NSBezierPath bezierPath]; [thePath appendBezierPathWithOvalInRect:ovalRect]; [thePath stroke]; } You could also create an oval using arcs, but doing so would duplicate what the preceding methods do internally and would be a little slower. The only reason to add individual arcs is to create a partial (non-closed) oval path. For more information, see “Adding Arcs” (page 148). Adding Arcs To draw arcs, use the following methods of NSBezierPath: ● appendBezierPathWithArcFromPoint:toPoint:radius: ● appendBezierPathWithArcWithCenter:radius:startAngle:endAngle: ● appendBezierPathWithArcWithCenter:radius:startAngle:endAngle:clockwise: The appendBezierPathWithArcFromPoint:toPoint:radius: method creates arcs by inscribing them in an angle formed by the current point and the two points passed to the method. Inscribing a circle in this manner can result in an arc that does not intersect any of the points used to specify it. It can also result in the creation of an unwanted line from the current point to the starting point of the arc. Paths Drawing Fundamental Shapes 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 148Figure 8-9 shows three different arcs and the control points used to create them. For the two arcs created using appendBezierPathWithArcFromPoint:toPoint:radius:, the current point must be set before calling the method. In both examples, the point isset to (30, 30). Because the radius of the second arc isshorter, and the starting point of the arc is not the same as the current point, a line is drawn from the current point to the starting point. Figure 8-9 Creating arcs Listing 8-12 shows the code snippets you would use to create each of the arcs from Figure 8-9. (Although the figure shows the arcs individually, executing the following code would render the arcs on top of each other. ) Listing 8-12 Creating three arcs NSBezierPath* arcPath1 = [NSBezierPath bezierPath]; Paths Drawing Fundamental Shapes 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 149NSBezierPath* arcPath2 = [NSBezierPath bezierPath]; [[NSColor blackColor] setStroke]; // Create the first arc [arcPath1 moveToPoint:NSMakePoint(30,30)]; [arcPath1 appendBezierPathWithArcFromPoint:NSMakePoint(0,30) toPoint:NSMakePoint(0,60) radius:30]; [arcPath1 stroke]; // Create the second arc. [arcPath2 moveToPoint:NSMakePoint(30,30)]; [arcPath2 appendBezierPathWithArcFromPoint:NSMakePoint(30,40) toPoint:NSMakePoint(70,30) radius:20]; [arcPath2 stroke]; // Clear the old arc and do not set an initial point, which prevents a // line being drawn from the current point to the start of the arc. [arcPath2 removeAllPoints]; [arcPath2 appendBezierPathWithArcWithCenter:NSMakePoint(30,30) radius:30 startAngle:45 endAngle:135]; [arcPath2 stroke]; Paths Drawing Fundamental Shapes 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 150Adding Bezier Curves To draw Bezier curves, you must use the curveToPoint:controlPoint1:controlPoint2: method of NSBezierPath. This method supports the creation of a cubic curve from the current point to the destination point you specify when calling the method. The controlPoint1 parameter determinesthe curvature starting from the current point, and controlPoint2 determines the curvature of the destination point, as shown in Figure 8-1 (page 132). Figure 8-10 Cubic Bezier curve Adding Text Because NSBezierPath only supports path-based content, you cannot add text characters directly to a path; instead, you must add glyphs. A glyph is the visual representation of a character (or partial character) in a particular font. For glyphs in an outline font, this visual representation is stored as a set of mathematical paths that can be added to an NSBezierPath object. Note: Using NSBezierPath is not the most efficient way to render text, but can be used in situations where you need the path information associated with the text. To obtain a set of glyphs, you can use the Cocoa text system or the NSFont class. Getting glyphs from the Cocoa text system is usually easier because you can get glyphs for an arbitrary string of characters, whereas using NSFont requires you to know the names of individual glyphs. To get glyphs from the Cocoa text system, you must do the following: 1. Create the text system objects needed to manage text layout. 2. Use the glyphAtIndex: or getGlyphs:range: method of NSLayoutManager to retrieve the desired glyphs. 3. Add the glyphs to your NSBezierPath object using one of the following methods: ● appendBezierPathWithGlyph:inFont: ● appendBezierPathWithGlyphs:count:inFont: Paths Drawing Fundamental Shapes 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 151When added to your NSBezierPath object, glyphs are converted to a series of path elements. These path elements simply specify lines and curves and do not retain any information about the characters themselves. You can manipulate paths containing glyphs just like you would any other path by changing the points of a path element or by modifying the path attributes. Drawing the Shapes in a Path There are two options for drawing the contents of a path: you can stroke the path or fill it. Stroking a path renders an outline of the path’sshape using the currentstroke color and path attributes. Filling the path renders the area encompassed by the path using the current fill color and winding rule. Figure 8-11 shows the same path from Figure 8-1 (page 132) but with the contents filled and a different stroke width applied. Figure 8-11 Stroking and filling a path. Drawing Rectangles Cocoa provides several functions for drawing rectangles to the current context immediately using the default attributes. These functions use Quartz primitives to draw one or more rectangles quickly, but in a way that may be less precise than if you were to use NSBezierPath. For example, these routines do not apply the current join style to the corners of a framed rectangle. Table 8-4 lists some of the more commonly used functions for drawing rectangles along with their behaviors. You can use these functions in places where speed is more important than precision. The syntax for each function is provided in a shorthand notation, with parameter types omitted to demonstrate the calling conventions. For a complete list of available functions, and their full syntax, see Application Kit Functions Reference . Paths Drawing Rectangles 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 152Table 8-4 Rectangle frame and fill functions Function Description void NSEraseRect(aRect) Fills the specified rectangle with white. Drawsthe frame of the rectangle using the current fill color, the default line width, and the NSCompositeCopy compositing operation. void NSFrameRect(aRect) Drawsthe frame of the rectangle using the current fill color, the specified width, and the NSCompositeCopy compositing operation. void NSFrameRectWithWidth(aRect, width) Drawsthe frame of the rectangle using the current fill color, the specified width, and the specified operation. void NSFrameRectWithWidthUsingOperation(aRect, width, op) Fills the rectangle using the current fill color and the NSCompositeCopy compositing operation. void NSRectFill(aRect) Fills the rectangle using the current fill color and specified compositing operation. void NSRectFillUsingOperation(aRect, op) Fillsthe C-style array of rectangles using the current fill color and the NSCompositeCopy compositing operation. void NSRectFillList(rectList, count) Fills the C-style array of rectangles using the corresponding list of colors. Each list must have the same number of entries. void NSRectFillListWithColors(rects, colors, count) Fillsthe C-style array of rectangles using the current fill color and the specified compositing operation. void NSRectFillListUsingOperation(rects, count, op) Fills the C-style array of rectangles using the corresponding list of colors and the specified compositing operation. The list of rectangles and list of colors must contain the same number of items. void NSRectFillListWithColorsUsingOperation(rects, colors, count, op) Paths Drawing Rectangles 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 153Important: You may have noticed that the NSFrameRect, NSFrameRectWithWidth, and NSFrameRectWithWidthUsingOperation functions draw the rectangle using the fill color instead of the stroke color. These methods draw the rectangle’s frame by filling four sub-rectangles, one for each side of the rectangle. This differs from the way NSBezierPath draws rectangles and can sometimes lead to confusion. If your rectangle does not show up the way you expected, check your code to make sure you are setting the drawing color using either the set or setFill method of NSColor. Working with Paths Building a sleek and attractive user interface is hard work and most programs use a combination of images and paths to do it. Paths have the advantage of being lightweight, scalable, and fast. Even so, paths are not appropriate in all situations. The following sections provide some basic tips and guidance on how to use paths effectively in your program. Building Paths Building a path involves creating an NSBezierPath object and adding path elements to it. All paths must start with a Move To element to mark the first point of the path. In some cases, this element is added for you but in others you must add it yourself. For example, methods that create a closed path (such as an oval or rectangle) insert a MoveTo element for you. A single NSBezierPath object may have multiple subpaths. Each subpath is itself a complete path, meaning the subpath may not appear connected to any other subpaths when drawn. Filled subpaths can still interact with each other, however. Overlapping subpaths may cancel each other’s fill effect, resulting in holes in the fill area. All subpaths in an NSBezierPath object share the same drawing attributes. The only way to assign different attributes to different paths is to create different NSBezierPath objects for each. Improving Rendering Performance As you work on your drawing code, you should keep performance in mind. Drawing is a processor intensive activity but there are many waysto reduce the amount of drawing performed by your application. The following sections offersome basic tipsrelated to improving drawing performance with Cocoa applications. For additional drawing-related performance tips, see Drawing Performance Guidelines. Paths Working with Paths 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 154Note: As with any determination of performance, you should measure the speed of your drawing operations before making any changes. If the amount of time spent inside the methods of NSBezierPath becomessignificant,simplifying your paths might offer better performance. Limiting the total amount of drawing you do during an update cycle might also improve performance. Reuse Your Path Objects If you draw the same content repeatedly, consider caching the objects used to draw that content. It is usually more efficient to retain an existing NSBezierPath object than to recreate it during each drawing cycle. For content that might change dynamically, you might also consider maintaining a pool of reusable objects. Correctness Versus Efficiency When writing your drawing code, you should always try to make that code as efficient as possible without sacrificing the quality of the rendered content. If your drawing code seems slow, there are some tradeoffs you can make to improve efficiency that reduce quality only temporarily: ● Use the available update rectanglesto draw only what has changed. Use different NSBezierPath objects for each part of the screen rather than one large object that covers everything. For more information, see “Reduce Path Complexity” (page 155). ● During scrolling, live resizing, or other time-critical operations, consider the following options: ● If your screen contains animated content, pause the animation until the operation is complete. ● Try temporarily increasing the flatness value for curved paths. The default flatness value is set to 0.6, which results in nice smooth curves. Increasing this value above 1.0 may make your curves look more jagged but should improve performance. You may want to try a few different values to determine a good tradeoff between appearance and speed. ● Disable anti-aliasing. For more information, see “Setting the Anti-aliasing Options” (page 37). ● When drawing rectangles, use NSFrameRect and NSRectFill for operations where the highest quality is not required. These functions offer close approximations to what you would get with NSBezierPath but are often a little faster. Reduce Path Complexity If you are drawing a large amount of content, you should do your best to reduce the complexity of the path data you store in a single NSBezierPath object. Path objects with hundreds of path elements require more calculations than those with 10 or 20 elements. Every line or curve segment you add increases the number of calculations required to flatten the path or determine whether a point is inside it. Numerous path crossings also increases the number of required calculations when filling the path. Paths Working with Paths 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 155If the accuracy of rendered paths is not crucial, try using multiple NSBezierPath objects to draw the same content. There is very little visual difference between using one path object or multiple path objects. If your path is already grouped into multiple subpaths, then it becomes easy to put some of those subpaths in other NSBezierPath objects. Using multiple path objects reduces the number of calculations for each subpath and also allows you to limit rendering to only those paths that are in the current update rectangle. Manipulating Individual Path Elements Given an NSBezierPath object with some existing path data, you can retrieve the points associated with that path and modify them individually. An illustration program might do this in response to a mouse event over one of the points in a path. If the mouse event results in that point being dragged to a new location, you can quickly update the path element with the new location and redraw the path. The elementCount method of NSBezierPath returns the total number of path elements for all subpaths of the object. To find out the type of a given path element, use the elementAtIndex: or elementAtIndex:associatedPoints: method. These methods return one of the values listed in Table 8-1 (page 131). Use the elementAtIndex:associatedPoints: method if you also want to retrieve the points associated with an element. If you do not already know the type of the path element, you should pass this method an array capable of holding at least three NSPoint data types. To change the points associated with a path element, use the setAssociatedPoints:atIndex: method. You cannot change the type of a path element, only the points associated with it. When changing the points, NSBezierPath takes only as many points from your point array as are needed. For example, if you specify three points for a Line To path element, only the first point is used. Listing 8-13 shows a method that updates the control point associated with a curve path element on the end of the current path. The pointsthat define the curve are stored in the order controlPoint1, controlPoint2, endPoint. This method replaces the point controlPoint2, which affects the end portion of the curve. Listing 8-13 Changing the control point of a curve path element - (void)replaceLastControlPointWithPoint:(NSPoint)newControl inPath:(NSBezierPath*)thePath { int elemCount = [thePath elementCount]; NSBezierPathElement elemType = [thePath elementAtIndex:(elemCount - 1)]; if (elemType != NSCurveToBezierPathElement) Paths Working with Paths 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 156return; // Get the current points for the curve. NSPoint points[3]; [thePath elementAtIndex:(elemCount - 1) associatedPoints:points]; // Replace the old control point. points[1] = newControl; // Update the points. [thePath setAssociatedPoints:points atIndex:(elemCount - 1)]; } Transforming a Path The coordinate system of an NSBezierPath object always matches the coordinate system of the view in which it is drawn. Thus, given a path whose first point is at (0, 0) in your NSBezierPath object, drawing the path in your view places that point at (0, 0) in the view’s current coordinate system. To draw that path in a different location, you must apply a transform in one of two ways: ● Apply the transform to the view coordinate system and then draw the path. For information on how to apply transforms to a view, see “Creating and Applying a Transform” (page 51). ● Apply the transform to the NSBezierPath object itself using the transformUsingAffineTransform: method and then draw it in an unmodified view. Both techniques cause the path to be drawn at the same location in the view; however, the second technique also has the side effect of permanently modifying the NSBezierPath object. Depending on your content, this may or may not be appropriate. For example, in an illustration program, you might want the user to be able to drag shapes around the view; therefore, you would want to modify the NSBezierPath object to retain the new position of the path. Creating a CGPathRef From an NSBezierPath Object There may be times when it is necessary to convert an NSBezierPath object to a CGPathRef data type so that you can perform path-based operations using Quartz. For example, you might want to draw your path to a Quartz transparency layer or use it to do advanced hit detection. Although you cannot use a NSBezierPath object directly from Quartz, you can use its path elements to build a CGPathRef object. Paths Working with Paths 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 157Listing 8-14 shows you how to create a CGPathRef data type from an NSBezierPath object. The example extends the behavior of the NSBezierPath class using a category. The quartzPath method uses the path elements of the NSBezierPath object to call the appropriate Quartz path creation functions. Although the method creates a mutable CGPathRef object, it returns an immutable copy for drawing. To ensure that the returned path returns correct results during hit detection, this method implicitly closes the last subpath if your code does not do so explicitly. Quartz requires paths to be closed in order to do hit detection on the path’s fill area. Listing 8-14 Creating a CGPathRef from an NSBezierPath @implementation NSBezierPath (BezierPathQuartzUtilities) // This method works only in OS X v10.2 and later. - (CGPathRef)quartzPath { int i, numElements; // Need to begin a path here. CGPathRef immutablePath = NULL; // Then draw the path elements. numElements = [self elementCount]; if (numElements > 0) { CGMutablePathRef path = CGPathCreateMutable(); NSPoint points[3]; BOOL didClosePath = YES; for (i = 0; i < numElements; i++) { switch ([self elementAtIndex:i associatedPoints:points]) { case NSMoveToBezierPathElement: CGPathMoveToPoint(path, NULL, points[0].x, points[0].y); break; case NSLineToBezierPathElement: Paths Working with Paths 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 158CGPathAddLineToPoint(path, NULL, points[0].x, points[0].y); didClosePath = NO; break; case NSCurveToBezierPathElement: CGPathAddCurveToPoint(path, NULL, points[0].x, points[0].y, points[1].x, points[1].y, points[2].x, points[2].y); didClosePath = NO; break; case NSClosePathBezierPathElement: CGPathCloseSubpath(path); didClosePath = YES; break; } } // Be sure the path is closed or Quartz may not do valid hit detection. if (!didClosePath) CGPathCloseSubpath(path); immutablePath = CGPathCreateCopy(path); CGPathRelease(path); } return immutablePath; } @end The code from the preceding example closes only the last open path by default. Depending on your path objects, you might also want to close intermediate subpaths whenever a new Move To element is encountered. If your path objects typically contain only one path, you do not need to do so, however. Paths Working with Paths 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 159Detecting Mouse Hits on a Path If you need to determine whether a mouse event occurred on a path or its fill area, you can use the containsPoint: method of NSBezierPath. This method teststhe point against all closed and open subpaths in the path object. If the point lies on or inside any of the subpaths, the method returns YES. When determining whether a point is inside a subpath, the method uses the nonzero winding rule. If your software runs in OS X v10.4 and later, you can perform more advanced hit detection using the CGContextPathContainsPoint and CGPathContainsPoint functions in Quartz. Using these functions you can determine if a point is on the path itself or if the point is inside the path using either the nonzero or even-odd winding rule. Although you cannot use these functions on an NSBezierPath object directly, you can convert your path object to a CGPathRef data type and then use them. For information on how to convert a path object to a CGPathRef data type, see “Creating a CGPathRef From an NSBezierPath Object” (page 157). Important: Quartz considers a point to be inside a path only if the path is explicitly closed. If you are converting your NSBezierPath objects to Quartz paths for use in hit detection, be sure to close any open subpaths either prior to or during the conversion. If you do not, points lying inside your path may not be correctly identified as such. Listing 8-15 shows an example of how you might perform advanced hit detection on an NSBezierPath object. This example adds a method to the NSBezierPath class using a category. The implementation of the method adds a CGPathRef version of the current path to the current context and calls the CGContextPathContainsPoint function. This function uses the specified mode to analyze the location of the specified point relative to the current path and returns an appropriate value. Modes can include kCGPathFill, kCGPathEOFill, kCGPathStroke, kCGPathFillStroke, or kCGPathEOFillStroke. Listing 8-15 Detecting hits on a path @implementation NSBezierPath (BezierPathQuartzUtilities) // Note, this method works only in OS X v10.4 and later. - (BOOL)pathContainsPoint:(NSPoint)point forMode:(CGPathDrawingMode)mode { CGPathRef path = [self quartzPath]; // Custom method to create a CGPath CGContextRef cgContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; CGPoint cgPoint; BOOL containsPoint = NO; cgPoint.x = point.x; Paths Working with Paths 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 160cgPoint.y = point.y; // Save the graphics state before doing the hit detection. CGContextSaveGState(cgContext); CGContextAddPath(cgContext, path); containsPoint = CGContextPathContainsPoint(cgContext, cgPoint, mode); CGContextRestoreGState(cgContext); return containsPoint; } @end Paths Working with Paths 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 161Cocoa was designed to integrate well with other technologies in OS X. Many technologies are packaged as Objective-C frameworks, which makesincluding them in Cocoa easy. You are not limited to the use of Objective-C frameworks, though. Cocoa itself uses Quartz internally to implement most drawing routines. You can use Quartz and other C-based technologies,such as OpenGL and QuickTime, from your code with little extra effort. The sections that follow provide information about how to incorporate some of the more important drawing technologies available in OS X. Using Quartz in Your Application Everything you can draw using Cocoa can also be drawn using Quartz. The Cocoa drawing code itself uses Quartz primitives to render content. Cocoa simply adds an object-oriented interface and in some cases does more of the work for you. Cocoa does not provide classes for all Quartz behavior, however. In situations where a feature is not available in Cocoa, you may want to use Quartz directly. For general information about Quartz features and how to use them, see Quartz 2D Programming Guide . Using Quartz Features Because Quartz implements some features that Cocoa does not, there may be times when you need to use Quartz function calls from your Cocoa code. Because Cocoa uses Quartz for most drawing operations, mixing the two technologies is not an issue. Some of the Quartz features that are not supported directly by Cocoa include the following: ● Layers ● Gradients (also called shadings) ● Image data sources ● Blend modes (Cocoa uses compositing modes instead) ● Masking images ● Transparency layers (for grouping content) ● Arbitrary patterns (other than images) 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 162 Incorporating Other Drawing TechnologiesIn each case, you are free to use Quartz functions to take advantage of these features. Some features can produce data types that you can then incorporate back into a Cocoa object. (For example, you can use an image data source to obtain a Quartz image (CGImageRef), which you can then use to create an NSImage object.) In some cases, however, you may need to perform the entire operation using Quartz functions. For information on how to use Quartz features, see Quartz 2D Programming Guide . Graphics Type Conversions When going back and forth between Cocoa and Quartz code,some conversion of data types may be necessary. Table 9-1 shows the Cocoa equivalents of some basic Quartz types. Table 9-1 Simple data-type conversions Cocoa type Quartz type NSRect CGRect NSPoint CGPoint NSSize CGSize Although in each case the structure layout is the same, you cannot pass the Quartz data type directly to a method expecting the Cocoa type. To convert, you must cast from one type to another, as shown in the following example: NSRect cocoaRect = *(NSRect*)&myCGRect; Table 9-2 lists the Cocoa classes that approximate the behavior of specific Quartz data types. In some cases, the Cocoa class wraps an instance of its Quartz counterpart, but that is not always true. In the case of shadows, Quartz provides no direct data type for managing the shadow parameters; you must set shadows attributes in Quartz using several different functions. In the case of layers, there are no Cocoa equivalents. Table 9-2 Equivalent Cocoa and Quartz data types Cocoa type Quartz type NSGraphicsContext CGContextRef NSAffineTransform CGAffineTransform NSColor CGColorRef, CGPatternRef NSFont CGFontRef Incorporating Other Drawing Technologies Using Quartz in Your Application 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 163Cocoa type Quartz type NSGlyph CGGlyph NSImage CGImageRef NSBezierPath CGPathRef NSShadow CGSize, CGColorRef NSGradient (OS X v10.5 and later) CGShadingRef No equivalent CGLayerRef Because Cocoa types often wrap equivalent Quartz types, you should look at the Cocoa reference documentation for information about how to get equivalent Quartz objects, if any. In many cases, Cocoa classes do not offer direct access to their Quartz equivalent and you may need to create the Quartz type based on information in the Cocoa object, such as in the following cases: ● To create a CGPathRef object from an NSBezierPath object, you must redraw the path using Quartz function calls. Use the elementAtIndex:associatedPoints: method of NSBezierPath to retrieve the path’s point information. ● To convert back and forth between CGColorRef and NSColor objects, get the color component values from one object and use those values to create the other object. When creating colors, you may also need to specify the color space for that color. For the most part, Quartz and Cocoa support the same color spaces. If a color uses a custom color space, you can use the available ICC profile data to create the appropriate color space object. ● To create an NSImage object from a Quartz image, you need to create the image object indirectly. For information on how to do this, see “Using a Quartz Image to Create an NSImage” (page 95). ● To create Quartz shadows, you can use the methods of NSShadow to retrieve the color, offset, and blur radius values prior to calling CGContextSetShadow or CGContextSetShadowWithColor. Getting a Quartz Graphics Context Before using any Quartz features, you need to obtain a Quartz graphics context (CGContextRef) for drawing. For view-based drawing, you can get the context by sending a graphicsPort message to the current Cocoa graphics context (NSGraphicsContext). This method returns a pointer that you can cast to a CGContextRef data type and use in subsequent Quartz function calls. Incorporating Other Drawing Technologies Using Quartz in Your Application 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 164Creating a Cocoa Graphics Context Using Quartz In OS X v10.4 and later, if you have an existing Quartz graphics context, you can create a Cocoa graphics context object using the graphicsContextWithGraphicsPort:flipped: class method of NSGraphicsContext. You then use the setCurrentContext: class method to make that context the current context. Modifying the Graphics State When mixing calls to Quartz and Cocoa, remember that many Cocoa classes maintain a local copy of some graphics attributes normally associated with the Quartz graphics context. When such a class is ready to draw its content, it modifiesthe graphicsstate to match itslocalsettings, drawsits content, and restoresthe graphics state to its originalsettings. If you use Quartz to change an attribute that is maintained locally by a Cocoa class, your changes may not be used. If you make changesto the graphicsstate using the NSGraphicsContext class, your changes are immediately conveyed to the Quartz graphics context, and vice versa. If you are not using NSGraphicsContext to set an attribute, you should assume that the attribute is local to the object. For example, the NSBezierPath class prefers local copies of graphics attributes over the default (or global) attributes stored in the current context. Using OpenGL in Your Application OpenGL is an open, cross-platform, three-dimensional (3D) graphics standard with broad industry support. OpenGL eases the task of writing real-time 2D or 3D graphics applications by providing a mature, well-documented graphics processing pipeline that supports the abstraction of current and future hardware accelerators. The sections that follow provide a glimpse into the techniques used to incorporate OpenGL drawing calls into your Cocoa application. For more on OpenGL support in OS X, and for detailed examples of how to integrate OpenGL into your Cocoa application, see OpenGL Programming Guide for Mac . For general information about OpenGL, see Reference Library > Graphics & Imaging > OpenGL. Using NSOpenGLView One way to do OpenGL drawing is to add an OpenGL view (an instance of NSOpenGLView) to your window. An OpenGL view behaves like any other view but also stores a pointer to an OpenGL graphics context object (an instance of NSOpenGLContext). Storing the graphics context in the view eliminates the need for your code to recreate the context during each drawing cycle, which can be expensive. Incorporating Other Drawing Technologies Using OpenGL in Your Application 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 165To use an OpenGL view in your program, you create a subclass of NSOpenGLView and add that view to your window, either programmatically or using Interface Builder. When creating an OpenGL view programmatically, you specify the pixel format object you want to associate with the view. A pixel format object (an instance of NSOpenGLPixelFormat)specifiesthe buffers and other rendering attributes of the OpenGL graphics context. For information on the meaning of different pixel format attributes, see OpenGL Programming Guide for Mac . If you use Interface Builder to add your view to a window, you specify the pixel format information using the inspector for your view. Interface Builder lets you specify some pixel attributes, but not all. To support other attributes, you must replace the view’s pixel format object at runtime using the setPixelFormat: method. Important: If you set the pixel format attributes programmatically, you must do so before getting the OpenGL graphics context using the openGLContext method. The graphics context is created with the current pixel format information and is not recreated if that information changes. Alternatively, you can change the OpenGL graphics context at any time using the setOpenGLContext: method. As with other views, you use your OpenGL view’s drawRect: method to draw the content of your view. When your drawRect: method is invoked, the environment is automatically configured for drawing using the OpenGL graphics context associated with your view. Unlike with other graphics contexts, you do not need to restore the previous OpenGL graphics context when you are done drawing. OpenGL does not maintain a stack of graphics contexts that need to be popped as they are no longer needed. Instead, it simply uses the most recent context that was made current. Creating an OpenGL Graphics Context Before creating an OpenGL graphics context object, you first create a pixel format object (NSOpenGLPixelFormat). The attributes you specify when creating your pixel format object determine the rendering behavior of the graphics context. Once you have a valid pixel format object, you can create and initialize your OpenGL graphics context object. Listing 9-1 attempts to create an OpenGL graphics context that supports full-screen, double-buffered, 32-bit drawing. If the desired renderer is available, it returns the context; otherwise, it returns nil. Listing 9-1 Creating an OpenGL graphics context - (NSOpenGLContext*)getMyContext { // Specify the pixel-format attributes. NSOpenGLPixelFormatAttribute attrs[] = { Incorporating Other Drawing Technologies Using OpenGL in Your Application 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 166NSOpenGLPFAFullScreen, NSOpenGLPFADoubleBuffer, NSOpenGLPFADepthSize, 32, 0 }; // Create the pixel-format object. NSOpenGLContext* myContext = nil; NSOpenGLPixelFormat* pixFmt = [[NSOpenGLPixelFormat alloc] initWithAttributes:attrs]; // If the pixel format is valid, create the OpenGL context. if (pixFmt != nil) { myContext = [[NSOpenGLContext alloc] initWithFormat:pixFmt shareContext:NO]; } [pixFmt release]; return myContext; } Because the creation of OpenGL graphics contexts depends on the currently available renderers, your code should always verify that the desired objects were created before trying to use them. If creating an object fails, you can always try to create it again using a different set of attributes. Using QuickTime in Your Application QuickTime is Apple's cross-platform multimedia technology designed to help you create and deliver video, sound, animation, graphics, text, interactivity, and music. QuickTime supports dozens of file and compression formats for images, video, and audio, including ISO-compliant MPEG-4 video and AAC audio. You can incorporate QuickTime features into your Cocoa applications in one of two ways. The easiest way is through the QuickTime Kit, which is a full-featured Objective-C based framework for the QuickTime interfaces. If you are already familiar with the C-based QuickTime interfaces, you can use those instead. Incorporating Other Drawing Technologies Using QuickTime in Your Application 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 167Using the QuickTime Kit The QuickTime Kit framework (QTKit.framework) works with QuickTime movies in Cocoa applications in OS X. The QuickTime Kit framework was introduced in OS X v10.4 and was designed as an alternative to and eventual replacement for the existing NSMovie and NSMovieView classes in Cocoa. This new framework provides more extensive coverage of QuickTime functions and data types than had been offered by the Application Kit classes. More importantly, the framework does not require Cocoa programmersto be conversant with Carbon data types such as handles, aliases, file-system specifications, and so on. The QuickTime Kit framework is available primarily in OS X v10.4 and later, but it is also supported in OS X v10.3 with QuickTime 7 or later installed. For information on how to use the QuickTime Kit, see QuickTime Kit Programming Guide . For a reference of the classes in the QuickTime Kit, see QTKit Framework Reference . Using QuickTime C-Based Functions Long before the introduction of the QuickTime Kit framework, QuickTime programs were written using a C-based API. The QuickTime API encompasses thousands of functions and gives you the maximum flexibility in managing QuickTime content. You can use this API in your Cocoa applications like you would any other framework. For an introduction toQuickTime,seeQuickTimeOverview. Forthe completeQuickTime reference,seeQuickTime Framework Reference . Using Quartz Composer Compositions If yoursoftware runsin OS X v10.4 and later, you can use Quartz Composer to render complex graphical content. Quartz Composer usesthe latestOS X graphicstechnologiesto create advanced graphical images and animations quickly and easily. You use the Quartz Composer application to create composition files graphically and then load those compositions into your Cocoa application and run them. Changing the behavior of your Cocoa application is then as simple as updating the composition file. Quartz Composer is especially suited for applications that want to perform complex image manipulations. Through it, you gain easy access to features of Quartz 2D, Core Image, Core Video, OpenGL, QuickTime, MIDI System Services, and Real Simple Syndication (RSS). Your application can render compositions for display or provide the user with controls for manipulating the composition parameters. For a detailed example showing you how to run a composition from your Cocoa application, see the chapter “Using QCRenderer to Play a Composition” in Quartz Composer Programming Guide . Incorporating Other Drawing Technologies Using Quartz Composer Compositions 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 168Choosing the Right Imaging Technology OS X includes several different technologies for manipulating images. Although the NSImage class provide a robust feature set that is sufficient for many developer’s uses, there may be specific times when you need to use other imaging technologies. Table 9-3 lists some of the other imaging technologies available and when you might use each one of them. Table 9-3 Imaging technologies Image Description technology Quartz images are immutable data types that you use to manipulate bitmap data in Quartz. Although NSImage is easier to use and provides automatic support for resolution independence, you might need to create Quartz images if another API you are using expects them. You can create a Quartz image by drawing into a NSBitmapImageRep object or Quartz bitmap context and then extracting a CGImageRef from there. Quartz images are part of the Application Services framework. Quartz Images (CGImageRef) Quartz layers are a mutable alternative to Quartz images. You can draw to layers much like you would draw to an NSImage object. You do so by creating a context, locking focus on that context, drawing, and retrieving an image object from the results. Because they are implemented in video memory, layers can be very efficient to use, especially if you need to draw the same image repeatedly. Quartz layers are available in OS X v10.4 and later as part of the Application Services framework. Quartz Layers (CGLayerRef) The Core Image framework is geared toward processing image data. You would use this technology to apply visual effects or filters to existing bitmap images. Because it is explicitly designed for manipulating bitmap images, you must convert your images to a CIImage object before you do any processing. Core Image is available in OS X v10.4 and later as part of the Quartz Core framework. Core Image (CIImage) The Image I/O framework is geared towards developers who need more direct control over reading and writing image data. You might use this framework to convert imagesfrom one format to another or you might use it to add metadata to an image created by your program. The features of Image I/O are available in OS X v10.4 and later as part of the Application Services framework. Image I/O While not explicitly an imaging technology, the Core Animation framework is a smart and efficient way to render images and other data inside a view. The framework provides a cached backing store that makes it possible to do animations with a minimal amount of redrawing. You might use this technology in place of NSImage or other imaging technologies to create animation effects or other rapidly changing graphics. It offers respectable animation performance without requiring you to use low-level APIs such as OpenGL. The Core Animation framework is available in OS X v10.5 and later as part of the Quartz Core framework. Core Animation Incorporating Other Drawing Technologies Choosing the Right Imaging Technology 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 169This table describes the changes to Cocoa Drawing Guide . Date Notes Added information on supporting offscreen drawing for high resolution displays. 2012-09-19 Added “Drawing Offscreen Images Using a Block-Based Drawing Method to Support High Resolution Displays” (page 89). Updated “Guidelines for Using Images” (page 86). 2012-07-23 Updated links to guidelines on high resolution. 2011-01-18 Corrected reference to application icon image name constant. 2009-10-19 Corrected typos. 2009-01-06 Updated the guidelines associated with resolution independent drawing. Updated advice for creating an NSImage from a CGImageRef. Updated the discussion of screen coordinates. 2008-10-15 2007-10-31 Updated the content for OS X v10.5. Added information about NSGradient and rounded rectangle support. Updated the information about flipped coordinate systems. Fixed bugs in several code examples. Added guidance about which imaging technologies work best for different types of operations. Added the mathematical equations corresponding to the available compositing operations. 2012-09-19 | © 2005, 2012 Apple Inc. All Rights Reserved. 170 Document Revision HistoryDate Notes Fixed several code examples and added information about how to add a ColorSync profile to a bitmap. 2006-10-03 Changed matrix values to match the values in NSAffineTransformStruct. Fixed example for casting a CGRect to an NSRect. 2006-06-28 2006-04-04 Moved animation object details to "Animation Programming Guide." New document that describes how to draw content from a Cocoa application. 2006-03-08 This document replaces information about Cocoa drawing that was previously published in BasicDrawing , Drawing and Images, TheDrawing Environment, and OpenGL . Docu