Cocoa与Objective-C:构建与运行(影印版)
Cocoa与Objective-C:构建与运行(影印版)
Scott Stevenson
出版时间:2010年12月
页数:396
为Mac、iPhone和iPad打造健壮的应用程序,无论你是只有基本的编程技能,还是有多年的开发经验。在本书中,你将通过循序渐进的教程、亲身实践的练习、简明扼要的范例,以及来自Cocoa专家的谆谆教诲,学会如何运用Apple的Cocoa框架和Objective-C语言。
《Cocoa与Objective-C:构建与运行》给你打下充分的理论基础,然后向你展示如何使用Apple的快速开发工具——Xcode和Interface Builder,来开发Cocoa应用程序、管理用户交互、创建很棒的UI等等。你将迅速获得开发高级软件所需的经验,无论你是编程新手还是该平台的入门用户。

· 获得C语言编程基础技能的快速实践导览
· 学习如何使用Interface Builder快速设计并构建应用的用户界面原型
· 通过创建对象和学习内存管理,开始使用Objective-C
· 学习用于对象之间共享数据的模型-视图-控制器(MVC)方法
· 理解基础值类,这是Cocoa存储一般数据类型的健壮API
· 熟悉Apple的图形框架,并且学习如何用AppKit制作定制视图

“我刚开始在Mac上做开发时,就已是Scott的著作的读者。这本书提供的建议十分隽永,必将有益于读者。”
—— Rob Rhyne, 技术评论家和Briefs开发者
Scott Stevenson从事Cocoa应用开发八年,此外还拥有六年相关教学经验。他曾创建了风靡一时的Mac编程博客Theocacao,并且于2003年接手Cocoa Dev Central,成为主笔和编辑。他在硅谷组织了多场Cocoa Heads会议,并发表演讲。

建议读者应具备基础的编程经验。
  1. Preface
  2. 1. Setup and First Run
  3. Download and Install Xcode
  4. Your First Application
  5. Create the Interface
  6. Run the Finished Application
  7. 2. Thinking in Code: Basic C
  8. How Code Works
  9. How to Format Code
  10. Variables
  11. Types
  12. Constants
  13. Enumerated Types
  14. Typedefs
  15. Functions
  16. Declaring Functions
  17. Example: FirstProgram
  18. Displaying Values on the Command Line
  19. Compile and Run the Example
  20. Scope
  21. Static Variables
  22. Conditionals
  23. Example: ShoppingTrip
  24. Compile and Run
  25. Wrap Up
  26. 3. Memory and Pointers: Advanced C
  27. Arrays
  28. Loops
  29. Text Strings
  30. Multidimensional Arrays
  31. Pointers
  32. The Purpose of Pointers
  33. Using Pointers
  34. Pointers and the const Keyword
  35. Dynamic Memory
  36. Strings and Dynamic Memory
  37. Returning Strings from Functions
  38. Arrays of Strings
  39. Example: AddressBook
  40. Compile and Run the AddressBook Example
  41. Structs
  42. Header Files
  43. Compile and Run the HeaderFileTest Example
  44. Create Files for the Song Struct
  45. Final Example
  46. 4. Thinking in Objects
  47. Structs and Classes
  48. Designing Classes
  49. Accessors
  50. Inheritance
  51. Composition
  52. Object Lifetime
  53. Built-in Classes
  54. 5. Basic Objective-C
  55. NSString Basics
  56. Using Methods
  57. Nested Method Calls
  58. Multi-Input Methods
  59. Accessors
  60. Dot Syntax
  61. Creating Objects
  62. Basic Memory Management
  63. Using Autorelease Directly
  64. Declaring a Class
  65. Add Methods
  66. Implementing a Class
  67. init
  68. dealloc
  69. Example: PhotoInfo
  70. 6. More Objective-C
  71. More on Memory Management
  72. The Life of an Instance Variable
  73. Copying Objects
  74. Class Name Prefixes
  75. Properties
  76. Property Options
  77. 64-Bit Objective-C
  78. Enabling 64-Bit
  79. Should I Use 64-Bit?
  80. All Further Examples Assume 64-Bit
  81. Categories
  82. Categories for Private Methods
  83. Introspection
  84. Protocols
  85. Dynamic Messaging
  86. Using Selectors to Call Methods
  87. Forwarding Messages
  88. Exceptions
  89. Example: DataCollector
  90. Some New Classes and Methods
  91. Create the Files
  92. Build and Run
  93. 7. Foundation Value Classes
  94. NSString
  95. Ranges and Substrings
  96. Using NSString with C Types
  97. Comparing Strings for Equality
  98. Strings As File Paths
  99. Reading and Writing Files with Strings
  100. Mutability
  101. Advantages of Mutability
  102. Advantages of Immutability
  103. Core Foundation
  104. Memory Management
  105. Core Foundation Mutability
  106. Toll-Free Bridging
  107. Core Foundation Types As Properties
  108. Drawbacks of Core Foundation Types
  109. Open Source
  110. NSNumber
  111. CFNumberRef
  112. Cocoa Primitive Types
  113. NSDecimalNumber
  114. NSNumberFormatter
  115. When to Use Which Number Type
  116. NSData
  117. NSMutableData
  118. NSArray
  119. Fast Enumeration
  120. Blocks
  121. NSMutableArray
  122. CFArrayRef
  123. NSIndexSet
  124. NSDictionary
  125. NSMutableDictionary
  126. CFDictionaryRef
  127. NSSet
  128. NSMutableSet
  129. NSValue
  130. NSDate
  131. CFDateRef
  132. 8. Basic Controls
  133. How to Use This Chapter
  134. Windows and Views
  135. Targets and Actions
  136. Buttons
  137. Declaring Action Methods
  138. Connecting Actions
  139. Menus
  140. Responder Chain
  141. Pop-up Buttons
  142. Sliders
  143. Text Fields
  144. Outlets
  145. Datasources
  146. Table View Datasource Methods
  147. Implementing Datasource Methods
  148. Bindings
  149. Key-Value Protocols
  150. Bindings for Simple Controls
  151. Bindings for Complex Controls
  152. Tips for Debugging Bindings
  153. 9. Designing Applications Using MVC
  154. About This Project
  155. Window Controllers
  156. View Controllers
  157. Core Data
  158. Create the Project Files
  159. Create the Entities
  160. Add Attributes and Relationships
  161. Update the App Delegate
  162. Add the Quartz Framework
  163. Create the Window Controller
  164. Create the View Controllers
  165. Create the Managed Object Classes
  166. Create the User Interface
  167. Remove the Default Window
  168. Create the Main Window Interface
  169. Create the Browser Interface
  170. Create the Editor View Interface
  171. Create the List View Interface
  172. Run the Application
  173. Preparing for Release
  174. 10. Custom Views and Drawing
  175. Basic Geometry
  176. Geometry Structs As Strings
  177. Geometry Structs As NSValues
  178. Cocoa View Coordinates
  179. Derived Rects
  180. Comparison Functions
  181. Basic Drawing
  182. NSColor
  183. Subclassing NSView
  184. Instantiate the View
  185. The Graphics Context
  186. Bezier Paths
  187. Drawing Polygons
  188. Drawing Curved Paths
  189. Images
  190. Loading Image Data
  191. Drawing Images in a View
  192. Shadows
  193. Add a Shadow to StyledImageView
  194. Gradients
  195. Drawing a Gradient Background
  196. Drawing an Image Sheen
  197. Refactoring View Code
  198. Why You Should Refactor
  199. Goals for Refactoring
  200. Refactored Header
  201. Refactored Implementation
  202. Test the Refactored Version
  203. Text
  204. Fonts
  205. Attributed Strings
  206. Add a Title to StyledImageView
  207. Handling Mouse and Keyboard Events
  208. Keyboard Events
  209. Mouse Events
  210. Add Event Support to StyledImageView
  211. 11. The Final Word
  212. The List
  213. Websites
  214. Last Thought
  215. Index
书名:Cocoa与Objective-C:构建与运行(影印版)
作者:Scott Stevenson
国内出版社:东南大学出版社
出版时间:2010年12月
页数:396
书号:978-7-5641-2413-7
原版书出版商:O'Reilly Media
Scott Stevenson
 
Scott Stevenson已经从事Cocoa应用程序开发8年,并且从事相关的教学工作6年。他创建了广受欢迎的Mac编程博客Theocacao,并且从2003年开始负责Cocoa Dev Central,并已成为其主要作者和编辑。他组织并出席了许多Silicon Valley CocoaHeads会议。Scott生活在San Francisco Bay Area。
 
 
The animal on the cover of Cocoa and Objective-C: Up and Running is a Pampas cat
(Leopardus pajeros). Named for the Pampas region of South America, the Pampas cat
is relatively small for a wild cat and resembles domestic cats in size and stature: adults
grow to only about two feet high and weigh between three and four kilograms. Individuals
display varying combinations of stripes and spots on their coats, and vary in
color depending on geographical location; dominant colors include grey, yellowbrown,
rust, and black.
The Pampas cat exists only in western central South America, but enjoys a wide
distribution therein. The species has shown that it can thrive not only in the open
grasslands with which it is most often associated, but also in the woodlands of Gran
Chaco and central Brazil, the low-lying swampy areas of Uruguay, the semiarid desert
of Patagonia, and the elevations of the Andes. In fact, the only significant South American
habitat in which it cannot be found is the rain forest, either temperate or tropical.
Scientific classification for the Pampas cat has become a complicated issue over the past
two decades. Formerly, the Pampas cat was considered only a subspecies of the Colocolo
(Leopardus colocolo), which itself previously belonged to the separate, now defunct
genus Oncifelis. The Pampas cat was distinguished as its own species in 2005, along
with the Pantanal cat (Leopardus braccatus), but taxonomists still disagree about
whether there is enough biological difference to validate the move. Despite their wide
range, relatively few specimens are captured for genetic testing.
购买选项
定价:52.00元
书号:978-7-5641-2413-7
出版社:东南大学出版社