【iPhone开发书籍大全】CocoaProgrammi

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

ptgCocoa®ProgrammingDeveloper’sHandbookFromtheLibraryofALESSANDROCAROLLOptgThispageintentionallyleftblankFromtheLibraryofALESSANDROCAROLLOptgCocoa®ProgrammingDeveloper’sHandbookDavidChisnallUpperSaddleRiver,NJ•Boston•Indianapolis•SanFranciscoNewYork•Toronto•Montreal•London•Munich•Paris•MadridCapetown•Sydney•Tokyo•Singapore•MexicoCityFromtheLibraryofALESSANDROCAROLLOptgCocoa®ProgrammingDeveloper’sHandbookCopyright©2010PearsonEducation,Inc.Allrightsreserved.Nopartofthisbookshallbereproduced,storedinaretrievalsystem,ortransmittedbyanymeans,electronic,mechanical,photocopying,recording,orotherwise,withoutwrittenpermissionfromthepublisher.Nopatentliabilityisassumedwithrespecttotheuseoftheinformationcontainedherein.Althougheveryprecautionhasbeentakeninthepreparationofthisbook,thepublisherandauthorassumenoresponsibilityforerrorsoromissions.Norisanyliabilityassumedfordamagesresultingfromtheuseoftheinformationcontainedherein.ISBN-13:978-0-321-63963-9ISBN-10:0-321-63963-4LibraryofCongressCataloging-in-PublicationDataChisnall,David.Cocoaprogrammingdeveloper’shandbook/DavidChisnall.p.cm.Includesindex.ISBN978-0-321-63963-9(pbk.:alk.paper)1.Cocoa(Applicationdevelopmentenvironment)2.Object-orientedprogramming(Computerscience)3.Applicationprograminterfaces(Computersoftware)4.MacOS.I.Title.QA76.64.C4852010005.26’8—dc222009042661PrintedintheUnitedStatesonrecycledpaperatEdwardsBrothersinAnnArbor,Michigan.FirstPrintingDecember2009TrademarksAlltermsmentionedinthisbookthatareknowntobetrademarksorservicemarkshavebeenappropriatelycapitalized.Pearsoncannotattesttotheaccuracyofthisinformation.Useofaterminthisbookshouldnotberegardedasaffectingthevalidityofanytrademarkorservicemark.WarningandDisclaimerEveryefforthasbeenmadetomakethisbookascompleteandasaccurateaspossible,butnowarrantyorfitnessisimplied.Theinformationprovidedisonan“asis”basis.Theauthorandthepublishershallhaveneitherliabilitynorresponsibilitytoanypersonorentitywithrespecttoanylossordamagesarisingfromtheinformationcontainedinthisbook.BulkSalesPearsonoffersexcellentdiscountsonthisbookwhenorderedinquantityforbulkpurchasesorspecialsales.Formoreinformation,pleasecontactusbyphoneoremail:U.S.CorporateandGovernmentSales1-800-382-3419corpsales@pearsontechgroup.comForsalesoutsideoftheU.S.,pleasecontacttheInternationalSalesgroup:InternationalSalesinternational@pearson.comEditor-in-ChiefMarkL.TaubManagingEditorJohnFullerFull-ServiceProductionManagerJulieB.NahilTechnicalReviewerGregoryCasamentoBookDesignerGaryAdairCompositionDavidChisnallFromtheLibraryofALESSANDROCAROLLOptgContentsListofFiguresxviiListofTablesxxiiiPrefacexxvIIntroducingCocoa11CocoaandMacOSX31.1UnderstandingWhentoUseCocoa................31.1.1Carbon.............................31.1.2Java...............................51.1.3Cocoa..............................51.1.4UNIXAPIs...........................71.1.5OtherChoices.........................81.2UnderstandingCocoa’sRoleinMacOSX............91.2.1Cocoa..............................91.2.2Quartz..............................111.2.3CoreFoundation........................131.2.4Darwin.............................141.2.5XNU...............................151.3Overview...............................162CocoaLanguageOptions172.1ObjectOrientation.........................172.2Objective-C.............................192.2.1Objective-CCompilerChoices................202.2.2DifferencesfromJavaandC++................222.2.3Objective-C2.0.........................232.3RubyandPython..........................24vFromtheLibraryofALESSANDROCAROLLOptgviContents2.4Summary...............................253UsingApple’sDeveloperTools273.1ObtainingApple’sDeveloperTools................283.2InterfaceBuilder...........................283.2.1OutletsandActions......................303.2.2CocoaBindings.........................313.2.3DrawingaSimpleApplication.................343.3XCode................................373.3.1CreatingaSimpleProject...................373.3.2OpenStepBundles.......................393.3.3DeveloperExamples......................413.3.4BuildingWithoutXCode...................423.4Objective-C.............................433.4.1WhyLearnObjective-C?...................443.4.2AdditionstoC.........................443.4.3ExceptionsandSynchronization...............523.4.4Introspection..........................553.4.5Objective-CinC........................583.4.6Objective-C2.0.........................603.4.7Blocks..............................633.4.8Objective-C++.........................663.5CocoaConventions.........................663.5.1Naming.............................663.5.2MemoryManagement.....................703.5.3ConstructorsandInitializers.................723.6Summary...............................74IITheCocoaFrameworks774Foundation:TheObjective-CStandardLibrary794.1GeneralConcepts..........................794.1.1Mutability............................804.1.2ClassClusters..........................804.2CoreFoundationTypes.......................854.3BasicDataTypes..........................8

1 / 924
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功