所需E币: 4
时间: 2019-12-22 04:19
大小: 15.03MB
ContentsIntroductionIntroduction13WhoShouldReadThisDocument?14OrganizationofThisDocument14ProvidingFeedback15SeeAlso15Chapter1iPhoneOSOverview17iPhoneOSFeatureSummary17DevelopmentTools19AboutiPhoneDevelopment19ApplicationStyles20ApplicationBasics23TheMulti-TouchInterface25WindowsandDrawing26KeyIntegrationFeatures28BeforeYouGoAnyFurther31Chapter2iPhoneOSTechnologies33CocoaTouch33Media34GraphicsTechnologies34CoreAudio35OpenAL36VideoTechnologies36CoreServices37AddressBook37CoreFoundation37CoreLocation38CFNetwork38Security38SQLite39XMLSupport39CoreOS3932008-07-08|2008AppleInc.AllRightsReserved.Chapter3DevelopmentEnvironment41TheDevelopmentProcess41CreatingYourProjectandWritingCode42Beginnings43UsingCodeCompletion48UsingAPIReferenceLookup49AccessingDocumentation51SettingYourApplication’sIcon52BuildingandRunningYourApplication52WorkingwiththeiPhoneSimulator53BuildingYourApplicationfortheiPhoneSimulator53RunningYourApplicationontheSimulator53CapabilitiesoftheiPhoneSimulator55WorkingwithaDevice55PreparingDevicesforDevelopment55BuildingYourApplicationforaDevice60RunningYourApplicationonaDevice60UsingtheOrganizer60BackingUpYourDigitalIdentifications62DebuggingYourCodeandMeasuringPerformance63DebuggingwithXcode63TuningApplicationPerformance65ConditionalLinkingtoSystemFrameworks66ManagingApplicationData67Chapter4ApplicationDesignGuidelines69TheRuntimeEnvironment69FastLaunch,ShortUse70TheVirtualMemorySystem70ManagingYourMemoryUsage70ReducingYourApplication’sMemoryFootprint71AllocatingMemoryWisely71ObservingLow-MemoryNotifications72PerformanceandResponsiveness73UsingMemoryEfficiently73ImprovingDrawingPerformance73ReducingPowerConsumption74TuningYourCode74Security74TheApplicationSandbox74UsingtheAvailableSecurityTechnologies75FileandDataManagement76ApplicationDirectoryStructure76BackupandRestore7742008-07-08|2008AppleInc.AllRightsReserved.CONTENTSGettingPathstoApplicationDirectories78ReadingandWritingFileData79FileAccessGuidelines83SavingStateInformation83CaseSensitivity84Networking84UserInterfaceDesignConsiderations84Chapter5TheApplicationEnvironment87CoreApplicationArchitecture87TheEventandDrawingCycle87TheApplicationLifeCycle90ApplicationInterruptions92TheApplicationBundle93ApplicationConfiguration95TheInformationPropertyList95CustomURLSchemesandInterapplicationCommunication98ApplicationIconandLaunchImages102TheSettingsBundle102LaunchinginLandscapeMode102InternationalizingApplications105Chapter6WindowsandViews109WhatAreWindowsandViews?109TheRoleofUIWindow109TheRoleofUIView110UIKitViewClasses111TheRoleofViewControllers114ViewArchitectureandGeometry114TheViewInteractionModel114TheViewRenderingArchitecture117ViewCoordinateSystems119TheRelationshipoftheFrame,Bounds,andCenter120CoordinateSystemTransformations121ContentModesandScaling122AutoresizingBehaviors124CreatingandManagingtheViewHierarchy125CreatingaViewObject127AddingandRemovingSubviews127ConvertingCoordinatesintheViewHierarchy129TaggingViews130ModifyingViewsatRuntime131AnimatingViews131RespondingtoLayoutChanges13352008-07-08|2008AppleInc.AllRightsReserved.CONTENTSRedrawingYourView’sContent134HidingViews134CreatingaCustomView134InitializingYourCustomView135DrawingYourView’sContent135RespondingtoEvents136CleaningUpAfterYourView137Chapter7EventHandling139EventsandTouches140EventDelivery141ResponderObjectsandtheResponderChain141RegulatingEventDelivery142HandlingMulti-TouchEvents143TheEvent-HandlingMethods143HandlingSingleandMultipleTapGestures144DetectingSwipeGestures146HandlingaComplexMulti-TouchSequence147Event-HandlingTechniques148Chapter8GraphicsandDrawing151QuartzConceptsandTerminology151TheViewDrawingCycle152TheNativeCoordinateSystem152GraphicsContexts153PointsVersusPixels154ColorandColorSpaces155SupportedImageFormats155DrawingTips156DecidingWhentoUseCustomDrawingCode156ImprovingDrawingPerformance156MaintainingImageQuality157DrawingwithQuartzandUIKit157ConfiguringtheGraphicsContext158CreatingandDrawingImages160CreatingandDrawingPaths161DrawingText161CreatingPatterns,Gradients,andShadings161DrawingwithOpenGLES162SettingUpaRenderingSurface162BestPractices164ImplementationDetails166ForMoreInformation169ApplyingCoreAnimationEffects17062008-07-08|2008AppleInc.AllRightsReserved.CONTENTSAboutLayers170AboutAnimations171Chapter9AudioandVideoTechnologies173UsingSoundiniPhoneOS173AudioSessions174PlayingShortSoundsUsingSystemSoundServices174PlayingSoundswithControlUsingAudioQueueServices176PlayingSoundswithPositioningUsingOpenAL179RecordingAudio179ParsingStreamedAudio180MixingandProcessingSounds180AudioUnitSupportiniPhoneOS181TriggeringVibration181TipsforManipulatingAudio181PreferredAudioFormatsiniPhoneOS182PlayingVideoFiles183Chapter10DeviceFeatures185AccessingAccelerometerEvents185ChoosinganAppropriateUpdateInterval186IsolatingtheGravityComponentFromAccelerationData187IsolatingInstantaneousMotionFromAccelerationData187GettingtheCurrentDeviceOrientation188GettingtheUser’sCurrentLocation188TakingPictureswiththeCamera190PickingaPhotofromthePhotoLibrary192Chapter11ApplicationPreferences193GuidelinesforPreferences193ThePreferencesInterface194TheSettingsBundle195TheSettingsPageFileFormat196HierarchicalPreferences197LocalizedResources198AddingtheSettingsBundletoYourApplication198EditingSettingsPages199CreatingSettingsPageFiles203AccessingYourPreferences204DebuggingPreferencesforSimulatedApplications20572008-07-08|2008AppleInc.AllRightsReserved.CONTENTSAppendixAAppleApplicationsURLSchemes207MailLinks207PhoneLinks208MapLinks209YouTubeLinks210iTunesLinks210DocumentRevisionHistory21182008-07-08|2008AppleInc.AllRightsReserved……