1 Introduction
What You Will Learn from This Book
How This Book Is Organized
Support
Acknowledgments
Preface to the Sixth Edition
I: The Objective-C Language
2 Programming in Objective-C
Compiling and Running Programs
Using Xcode
Using Terminal
Explanation of Your First Program
Displaying the Values of Variables
Summary
Exercises
3 Classes, Objects, and Methods
What Is an Object, Anyway?
Instances and Methods
An Objective-C Class for Working with Fractions
The @interface Section
Choosing Names
Class and Instance Methods
The @implementation Section
The program Section
Accessing Instance Variables and Data Encapsulation
Summary
Exercises
4 Data Types and Expressions
Data Types and Constants
Type int
Type float
Type char
Qualifiers: long, long long, short, unsigned, and signed
Type id
Arithmetic Expressions
Operator Precedence
Integer Arithmetic and the Unary Minus Operator
The Modulus Operator
Integer and Floating-Point Conversions
The Type Cast Operator
Assignment Operators
A Calculator Class
Exercises
5 Program Looping
The for Statement
Keyboard Input
Nested for Loops
for Loop Variants
The while Statement
The do Statement
The break Statement
The continue Statement
Summary
Exercises
6 Making Decisions
The if Statement
The if-else Construct
Compound Relational Tests
Nested if Statements
The else if Construct
The switch Statement
Boolean Variables
The Conditional Operator
Exercises
7 More on Classes
Separate Interface and Implementation Files
Synthesized Accessor Methods
Accessing Properties Using the Dot Operator
Multiple Arguments to Methods
Methods without Argument Names
Operations on Fractions
Local Variables
Method Arguments
The static Keyword
The self Keyword
Allocating and Returning Objects from Methods
Extending Class Definitions and the Interface File
Exercises
8 Inheritance
It All Begins at the Root
Finding the Right Method
Extension through Inheritance: Adding New Methods
A Point Class and Object Allocation
The @class Directive
Classes Owning Their Objects
Overriding Methods
Which Method Is Selected?
Abstract Classes
Exercises
9 Polymorphism, Dynamic Typing, and Dynamic Binding
Polymorphism: Same Name, Different Class
Dynamic Binding and the id Type
Compile Time Versus Runtime Checking
The id Data Type and Static Typing
Argument and Return Types with Dynamic Typing
Asking Questions about Classes
Exception Handling Using @try
Exercises
10 More on Variables and Data Types
Initializing Objects
Scope Revisited
More on Properties, Synthesized Accessors, and Instance Variables
Global Variables
Static Variables
Enumerated Data Types
The typedef Statement
Data Type Conversions
Conversion Rules
Bit Operators
The Bitwise AND Operator
The Bitwise Inclusive-OR Operator
The Bitwise Exclusive-OR Operator
The Ones Complement Operator
The Left-Shift Operator
The Right-Shift Operator
Exercises
11 Categories and Protocols
Categories
Class Extensions
Some Notes about Categories
Protocols and Delegation
Delegation
Informal Protocols
Composite Objects
Exercises
12 The Preprocessor
The #define Statement
More Advanced Types of Definitions
The #import Statement
Conditional Compilation
The #ifdef , #endif , #else , and #ifndef Statements
The #if and #elif Preprocessor Statements
The #undef Statement
Exercises
13 Underlying C Language Features
Arrays
Initializing Array Elements
Character Arrays
Multidimensional Arrays
Functions
Arguments and Local Variables
Returning Function Results
Functions, Methods, and Arrays
Blocks
Structures
Initializing Structures
Structures within Structures
Additional Details about Structures
Don’t Forget about Object-Oriented Programming!
Pointers
Pointers and Structures
Pointers, Methods, and Functions
Pointers and Arrays
Operations on Pointers
Pointers and Memory Addresses
They’re Not Objects!
Miscellaneous Language Features
Compound Literals
The goto Statement
The Null Statement
The Comma Operator
The sizeof Operator
Command-Line Arguments
How Things Work
Fact 1: Instance Variables Are Stored in Structures
Fact 2: An Object Variable Is Really a Pointer
Fact 3: Methods Are Functions, and Message Expressions Are Function Calls
Fact 4: The id Type Is a Generic Pointer Type
Exercises
II: The Foundation Framework
14 Introduction to the Foundation Framework
Foundation Documentation
15 Numbers, Strings, and Collections
Number Objects
String Objects
More on the NSLog Function
The description Method
Mutable Versus Immutable Objects
Mutable Strings
Array Objects
Making an Address Book
Sorting Arrays
Dictionary Objects
Enumerating a Dictionary
Set Objects
NSIndexSet
Exercises
16 Working with Files
Managing Files and Directories: NSFileManager
Working with the NSData Class
Working with Directories
Enumerating the Contents of a Directory
Working with Paths: NSPathUtilities.h
Common Methods for Working with Paths
Copying Files and Using the NSProcessInfo Class
Basic File Operations: NSFileHandle
The NSURL Class
The NSBundle Class
Exercises
17 Memory Management and Automatic Reference Counting
Automatic Garbage Collection
Manual Reference Counting
Object References and the Autorelease Pool
The Event Loop and Memory Allocation
Summary of Manual Memory Management Rules
Automatic Reference Counting
Strong Variables
Weak Variables
@autoreleasepool Blocks
Method Names and Non-ARC Compiled Code
18 Copying Objects
The copy and mutableCopy Methods
Shallow Versus Deep Copying
Implementing the <NSCopying> Protocol
Copying Objects in Setter and Getter Methods
Exercises
19 Archiving
Archiving with XML Property Lists
Archiving with NSKeyedArchiver
Writing Encoding and Decoding Methods
Using NSData to Create Custom Archives
Using the Archiver to Copy Objects
Exercises
III: Cocoa, Cocoa Touch, and the iOS SDK
20 Introduction to Cocoa and Cocoa Touch
Framework Layers
Cocoa Touch
21 Writing iOS Applications
The iOS SDK
Your First iPhone Application
Creating a New iPhone Application Project
Entering Your Code
Designing the Interface
An iPhone Fraction Calculator
Starting the New Fraction_Calculator Project
Defining the View Controller
The Fraction Class
A Calculator Class That Deals with Fractions
Designing the User Interface
Summary
Exercises
Appendixes
A Glossary
B Address Book Example Source Code
Index
不仅仅是语法书,更是思维训练营 很多人学习编程语言,往往停留在“知其然”的阶段,即学会了语法,但不知道“所以然”。《Objective-C程序设计(第6版 英文版)》则成功地突破了这一局限。它不仅仅是一本语法书,更是一本帮助你建立Objective-C思维模式的训练营。书中对很多概念的解释,都不仅仅是“是什么”,更是“为什么这样”。比如,当讲解到Category时,它不仅告诉你如何使用,更深入地分析了Category存在的意义和潜在的风险,从而引导读者在实际开发中做出更明智的选择。书中还穿插了一些关于编程哲学和工程伦理的讨论,这让我意识到,成为一名优秀的程序员,除了技术能力,更需要具备良好的职业素养。我特别喜欢书中关于重构的章节,它教会了我如何优雅地改进现有代码,而不仅仅是添加新功能。这种从“能写”到“写得好”的转变,是这本书带给我的最宝贵的财富。它让我明白,编程不仅仅是敲代码,更是一种解决问题、创造价值的艺术。
评分初学者心中的明灯,实践之路的坚实伙伴 作为一名刚刚踏入Objective-C编程领域的新手,我曾对iOS开发充满向往,却也为初学者教程的晦涩难懂感到沮丧。直到我遇到了这本《Objective-C程序设计(第6版 英文版)》。它的语言风格简直是为我量身定制的——清晰、简洁,而且充满耐心。作者仿佛一位经验丰富的导师,一步步引导我理解那些看似复杂的概念。从最基础的变量、数据类型,到面向对象编程的核心——类、对象、继承和多态,书中都给出了详尽的解释,并且辅以大量的代码示例。这些示例并非生硬的理论堆砌,而是真正能够运行并展示效果的小项目,这让我能够立刻将所学知识付诸实践。我尤其喜欢书中关于内存管理的部分,ARC(自动引用计数)的讲解深入浅出,让我这个新手不再对内存泄漏感到恐惧。每一章节的结尾都有练习题,这些题目很有挑战性,但又不会过于刁钻,完成它们能极大地巩固我所学的知识。对我而言,这本书最大的价值在于它让我感受到了编程的乐趣,而不是枯燥的学习。它点燃了我学习的热情,让我相信通过努力,我一定能掌握iOS开发的技能。
评分清晰的逻辑脉络,循序渐进的学习体验 在寻找一本真正能够帮助我系统学习Objective-C的书籍时,《Objective-C程序设计(第6版 英文版)》以其清晰的逻辑结构和循序渐进的讲解方式脱颖而出。从最基础的概念开始,书中层层递进,确保读者在掌握前一个知识点后,才能顺利进入下一个阶段的学习。我喜欢它不会一开始就抛出大量难以理解的术语,而是用一种非常自然的方式,将抽象的概念具象化。例如,当介绍协议(Protocol)时,作者并没有直接给出协议的定义,而是通过一个实际的场景,比如“不同对象如何协同工作”,来引出协议的作用和重要性。这种“情境化”的学习方式,让我更容易理解概念背后的逻辑,并将其与实际应用联系起来。书中的示例代码也很有条理,它们都有明确的目的,并且随着章节的深入,代码的复杂度也会逐步提升,这恰好与读者的学习曲线相匹配。我曾经尝试过其他一些Objective-C的书籍,但很多都显得碎片化,缺乏连贯性。而这本书,就像一条清晰的河流,引导我沿着正确的方向,稳步前进,最终抵达知识的彼岸。
评分简洁高效的典范,工程实践的基石 在我看来,《Objective-C程序设计(第6版 英文版)》是一本极其注重实用的教科书。它不仅仅教授Objective-C的语法,更强调如何在实际的iOS开发项目中高效地运用这门语言。书中穿插了大量真实世界的开发场景和最佳实践,例如如何设计健壮的API、如何有效地进行单元测试、以及如何在大型项目中组织代码结构。作者的叙述风格非常直接,直击痛点,不绕弯子。我尤其欣赏书中关于设计模式应用的章节,例如MVC、MVVM等,以及如何利用Objective-C的特性来实现这些模式。这让我意识到,仅仅掌握语法是远远不够的,更重要的是如何利用语言的优势来构建可维护、可扩展、高性能的应用程序。书中关于性能优化的建议也非常有价值,它教会我如何识别性能瓶颈,并提供切实可行的解决方案。对我而言,这本书更像是一本“武功秘籍”,它不仅传授了我招式,更教会了我如何运用这些招式去“打败”复杂的工程问题,成为一名更优秀的iOS开发者。
评分老兵的重拾利器,深度探索的引路人 作为一名在OC领域摸爬滚打多年的开发者,我原本以为自己对Objective-C已经了如指掌。然而,翻阅《Objective-C程序设计(第6版 英文版)》后,我发现自己还有太多未曾深入了解的角落。这本书的深度和广度都超出了我的预期。它不仅仅停留在语法层面,更深入地探讨了Objective-C的底层机制,例如消息传递的本质、运行时(Runtime)的强大功能,以及Objective-C与C、C++之间的交互。作者对这些复杂概念的阐述,既有理论的高度,又不失实践的指导。我尤其对书中关于Objective-C Runtime的章节印象深刻,它揭示了动态性背后的奥秘,让我对Objective-C的灵活性有了更深刻的认识。此外,书中还触及了一些高级主题,如block的底层实现、GCD(Grand Central Dispatch)的高级用法、以及Foundation框架中的一些鲜为人知的优化技巧。对于我这样想要进一步提升自身技术水平的开发者来说,这本书无疑提供了一条通往深度探索的清晰路径,它让我重新审视了自己过去的认知,并激发了更多关于代码优化和性能提升的思考。
评分是正版的。
评分好
评分全英文版,这类书不多,难得有一本,内容写得挺好够详细,
评分书页发黄,影响心情
评分好
评分好
评分是正版的。
评分全英文版,这类书不多,难得有一本,内容写得挺好够详细,
评分是正版的。
本站所有内容均为互联网搜索引擎提供的公开搜索信息,本站不存储任何数据与内容,任何内容与数据均与本站无关,如有需要请联系相关搜索引擎包括但不限于百度,google,bing,sogou 等
© 2025 book.cndgn.com All Rights Reserved. 新城书站 版权所有