Difference between revisions of "Objective-C 2.0 Essentials"

From Techotopia
Jump to: navigation, search
 
(60 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
<table border="0" cellspacing="0" width="100%"><tr>
 +
<td width="20%"><td align="center">[[Objective-C 2.0 Essentials|Table of Contents]]<td width="20%" align="right">[[About Objective-C Essentials|Next]]</td>
 +
<tr>
 +
<td width="20%"><td align="center"><td width="20%" align="right">About Objective-C Essentials</td>
 +
</table>
 +
<hr>
 +
 +
<htmlet>objc</htmlet>
 +
 +
The Objective-C 2.0  Essentials online book contains 34 chapters of detailed information intended to provide everything necessary to gain proficiency as an Objective-C programmer for both Mac OS X and iPhone development.
 +
 +
 +
 +
Objective-C 2.0 Essentials - Second Edition
 +
 +
© 2012 Neil Smyth / Payload Media. This eBook is provided for personal use only. Unauthorized use, reproduction and/or distribution strictly prohibited. All rights reserved.
 +
 +
 +
 +
== Table of Contents ==
 +
<table>
 +
<tr>
 +
<td>
 
# [[About Objective-C Essentials]]
 
# [[About Objective-C Essentials]]
 
#* [[About Objective-C Essentials|Why are you reading this?]]
 
#* [[About Objective-C Essentials|Why are you reading this?]]
Line 6: Line 29:
 
#* [[The History of Objective-C|The Smalltalk programming Language]]
 
#* [[The History of Objective-C|The Smalltalk programming Language]]
 
#* [[The History of Objective-C|C meets Smalltalk]]
 
#* [[The History of Objective-C|C meets Smalltalk]]
#* [[The History of Objective-C|Objective-C and Apple]]<br><br>
+
#* [[The History of Objective-C|Objective-C and Apple]]<br><br><htmlet>ezoictoc1</htmlet>
 
# [[Installing Xcode and Compiling Objective-C on Mac OS X]]
 
# [[Installing Xcode and Compiling Objective-C on Mac OS X]]
 
#* [[Installing Xcode and Compiling Objective-C on Mac OS X|Installing Xcode on Mac OS X]]
 
#* [[Installing Xcode and Compiling Objective-C on Mac OS X|Installing Xcode on Mac OS X]]
Line 41: Line 64:
 
#* [[Objective-C 2.0 Data Types|long long]]
 
#* [[Objective-C 2.0 Data Types|long long]]
 
#* [[Objective-C 2.0 Data Types|short]]
 
#* [[Objective-C 2.0 Data Types|short]]
#* [[Objective-C 2.0 Data Types|signed / unsigned]]<br><br>
+
#* [[Objective-C 2.0 Data Types|signed / unsigned]]<br><br><htmlet>ezoictoc2</htmlet>
 
# [[Working with Variables and Constants in Objective-C]]
 
# [[Working with Variables and Constants in Objective-C]]
 
#* [[Working with Variables and Constants in Objective-C|What is an Objective-C Variable]]
 
#* [[Working with Variables and Constants in Objective-C|What is an Objective-C Variable]]
Line 62: Line 85:
 
#* [[Objective-C Operators and Expressions|Bitwise Right Shift]]
 
#* [[Objective-C Operators and Expressions|Bitwise Right Shift]]
 
#* [[Objective-C Operators and Expressions|Compound Bitwise Operators]]<br><br>
 
#* [[Objective-C Operators and Expressions|Compound Bitwise Operators]]<br><br>
 +
# [[Objective-C 2.0 Operator Precedence]]
 +
#* [[Objective-C 2.0 Operator Precedence|An Example of Objective-C Operator Precedence]]
 +
#* [[Objective-C 2.0 Operator Precedence|Objective-C Operator Precedence and Associativity]]
 +
#* [[Objective-C 2.0 Operator Precedence|Overriding Operator Precedence]]<br><br>
 +
# [[Commenting Objective-C Code]]
 +
#* [[Commenting Objective-C Code|Why Comment your Code?]]
 +
#* [[Commenting Objective-C Code|Single Line Comments]]
 +
#* [[Commenting Objective-C Code|Multi-line Comments]]<br><br>
 
# [[Objective-C Flow Control with if and else]]
 
# [[Objective-C Flow Control with if and else]]
 
#* [[Objective-C Flow Control with if and else|Using the if Statement]]
 
#* [[Objective-C Flow Control with if and else|Using the if Statement]]
Line 72: Line 103:
 
#* [[The Objective-C switch Statement|A switch Statement Example]]
 
#* [[The Objective-C switch Statement|A switch Statement Example]]
 
#* [[The Objective-C switch Statement|Explaining the Example]]
 
#* [[The Objective-C switch Statement|Explaining the Example]]
#* [[The Objective-C switch Statement|Combining case Statements]]<br><br>
+
#* [[The Objective-C switch Statement|Combining case Statements]]<br><br><htmlet>ezoictoc3</htmlet>
 
# [[Objective-C Looping - The for Statement]]
 
# [[Objective-C Looping - The for Statement]]
 
#* [[Objective-C Looping - The for Statement|Why Use Loops?]]
 
#* [[Objective-C Looping - The for Statement|Why Use Loops?]]
Line 100: Line 131:
 
#* [[An Overview of Objective-C Object Oriented Programming|Structuring Object-Oriented Objective-C Code]]<br><br>
 
#* [[An Overview of Objective-C Object Oriented Programming|Structuring Object-Oriented Objective-C Code]]<br><br>
 
# [[Writing Objective-C Class Methods]]
 
# [[Writing Objective-C Class Methods]]
 +
#* [[Writing Objective-C Class Methods|Instance and Class Methods]]
 +
#* [[Writing Objective-C Class Methods|Creating a New Class Method]]
 +
#* [[Writing Objective-C Class Methods|The @interface Section]]
 +
#* [[Writing Objective-C Class Methods|The @implementation Section]]
 +
#* [[Writing Objective-C Class Methods|The main() Function]]<br><br>
 
# [[Objective-C - Data Encapsulation, Synthesized Accessors and Dot Notation]]
 
# [[Objective-C - Data Encapsulation, Synthesized Accessors and Dot Notation]]
 +
#* [[Objective-C - Data Encapsulation, Synthesized Accessors and Dot Notation|Data Encapsulation]]
 +
#* [[Objective-C - Data Encapsulation, Synthesized Accessors and Dot Notation|Synthesized Accessor Methods]]
 +
#* [[Objective-C - Data Encapsulation, Synthesized Accessors and Dot Notation|Direct Access to Encapsulated Data]]
 +
#* [[Objective-C - Data Encapsulation, Synthesized Accessors and Dot Notation|Objective-C and Dot Notation]]
 +
#* [[Objective-C - Data Encapsulation, Synthesized Accessors and Dot Notation|Controlling Access to Instance Variables]]<br><br>
 +
# [[Objective-C Inheritance]]
 +
#* [[Objective-C Inheritance|Inheritance, Classes and Subclasses]]
 +
#* [[Objective-C Inheritance|An Objective-C Inheritance Example]]
 +
#* [[Objective-C Inheritance|Extending the Functionality of a Subclass]]
 +
#* [[Objective-C Inheritance|Overriding Inherited Methods]]<br><br>
 +
# [[Pointers and Indirection in Objective-C]]
 +
#* [[Pointers and Indirection in Objective-C|How Variables are Stored]]
 +
#* [[Pointers and Indirection in Objective-C|An Overview of Indirection]]
 +
#* [[Pointers and Indirection in Objective-C|Indirection and Objects]]
 +
#* [[Pointers and Indirection in Objective-C|Indirection and Object Copying]]<br><br>
 +
# [[Objective-C Dynamic Binding and Typing with the id Type]]
 +
#* [[Objective-C Dynamic Binding and Typing with the id Type|Static Typing vs Dynamic Typing]]
 +
#* [[Objective-C Dynamic Binding and Typing with the id Type|Dynamic Binding]]
 +
#* [[Objective-C Dynamic Binding and Typing with the id Type|Polymorphism]]<br><br>
 +
# [[Objective-C Variable Scope and Storage Class]]
 +
#* [[Objective-C Variable Scope and Storage Class|Variable Scope]]
 +
#* [[Objective-C Variable Scope and Storage Class|Block Scope]]
 +
#* [[Objective-C Variable Scope and Storage Class|Function Scope]]
 +
#* [[Objective-C Variable Scope and Storage Class|Global Scope]]
 +
#* [[Objective-C Variable Scope and Storage Class|File Scope]]
 +
#* [[Objective-C Variable Scope and Storage Class|Variable Storage Class]]<br><br><htmlet>ezoictoc4</htmlet>
 +
# [[An Overview of Objective-C Functions]]
 +
#* [[An Overview of Objective-C Functions|What is a Function?]]
 +
#* [[An Overview of Objective-C Functions|How to Declare an Objective-C Function]]
 +
#* [[An Overview of Objective-C Functions|Calling an Objective-C Function]]
 +
#* [[An Overview of Objective-C Functions|Function Prototypes]]
 +
#* [[An Overview of Objective-C Functions|Function Scope and the static Specifier]]
 +
#* [[An Overview of Objective-C Functions|Static Variables in Functions]]<br><br>
 +
# [[Objective-C Enumerators]]
 +
#* [[Objective-C Enumerators|Why Use Enumerators]]
 +
#* [[Objective-C Enumerators|Declaring an Enumeration]]
 +
#* [[Objective-C Enumerators|Creating and Using an Enumeration]]
 +
#* [[Objective-C Enumerators|Enumerators and Variable Names]]<br><br>
 +
# [[An Overview of the Objective-C Foundation Framework]]
 +
#* [[An Overview of the Objective-C Foundation Framework|The Foundation Framework]]
 +
#* [[An Overview of the Objective-C Foundation Framework|Including the Foundation Headers]]
 +
#* [[An Overview of the Objective-C Foundation Framework|Finding the Foundation Framework Documentation]]<br><br>
 +
# [[Working with String Objects in Objective-C]]
 +
#* [[Working with String Objects in Objective-C|Strings without NSString]]
 +
#* [[Working with String Objects in Objective-C|Declaring Constant String Objects]]
 +
#* [[Working with String Objects in Objective-C|Creating Mutable and Immutable String Objects]]
 +
#* [[Working with String Objects in Objective-C|Getting the Length of a String]]
 +
#* [[Working with String Objects in Objective-C|Copying a String]]
 +
#* [[Working with String Objects in Objective-C|Searching for a Substring]]
 +
#* [[Working with String Objects in Objective-C|Replacing Parts of a String]]
 +
#* [[Working with String Objects in Objective-C|String Search and Replace]]
 +
#* [[Working with String Objects in Objective-C|Deleting Sections of a String]]
 +
#* [[Working with String Objects in Objective-C|Extracting a Subsection of a String]]
 +
#* [[Working with String Objects in Objective-C|Inserting Text into a String]]
 +
#* [[Working with String Objects in Objective-C|Appending Text to the End of a String]]
 +
#* [[Working with String Objects in Objective-C|Comparing Strings]]
 +
#* [[Working with String Objects in Objective-C|Checking for String Prefixes and Suffixes]]
 +
#* [[Working with String Objects in Objective-C|Converting to Upper or Lower Case]]
 +
#* [[Working with String Objects in Objective-C|Converting Strings to Numbers]]
 +
#* [[Working with String Objects in Objective-C|Converting a String Object to ASCII]]<br><br>
 +
# [[Understanding Objective-C Number Objects]]
 +
#* [[Understanding Objective-C Number Objects|Creating and Initializing NSNumber Objects]]
 +
#* [[Understanding Objective-C Number Objects|Getting the Value of a Number Object]]
 +
#* [[Understanding Objective-C Number Objects|Comparing Number Objects]]
 +
#* [[Understanding Objective-C Number Objects|Getting the Number Object Value as a String]]<br><br>
 +
# [[Working with Objective-C Array Objects]]
 +
#* [[Working with Objective-C Array Objects|Mutable and Immutable Arrays]]
 +
#* [[Working with Objective-C Array Objects|Creating an Array Object]]
 +
#* [[Working with Objective-C Array Objects|Finding out the Number of Elements in an Array]]
 +
#* [[Working with Objective-C Array Objects|Accessing the Elements of an Array object]]
 +
#* [[Working with Objective-C Array Objects|Accessing Array Elements using Fast Enumeration]]
 +
#* [[Working with Objective-C Array Objects|Adding Elements to an Array Object]]
 +
#* [[Working with Objective-C Array Objects|Inserting Elements into an Array]]
 +
#* [[Working with Objective-C Array Objects|Deleting Elements from an Array Object]]
 +
#* [[Working with Objective-C Array Objects|Sorting Array Objects]]<br><br>
 +
# [[Objective-C Dictionary Objects]]
 +
#* [[Objective-C Dictionary Objects|What are Dictionary Objects?]]
 +
#* [[Objective-C Dictionary Objects|Creating Dictionary Objects]]
 +
#* [[Objective-C Dictionary Objects|Initializing and Adding Entries to a Dictionary Object]]
 +
#* [[Objective-C Dictionary Objects|Getting an Entry Count]]
 +
#* [[Objective-C Dictionary Objects|Accessing Dictionary Entries]]
 +
#* [[Objective-C Dictionary Objects|Removing Entries from a Dictionary Object]]<br><br>
 +
# [[Working with Directories in Objective-C]]
 +
#* [[Working with Directories in Objective-C|The Objective-C NSFileManager, NSFileHandle and NSData Classes]]
 +
#* [[Working with Directories in Objective-C|Understanding Pathnames in Objective-C]]
 +
#* [[Working with Directories in Objective-C|Creating an NSFileManager Instance Object]]
 +
#* [[Working with Directories in Objective-C|Identifying the Current Working Directory]]
 +
#* [[Working with Directories in Objective-C|Changing to a Different Directory]]
 +
#* [[Working with Directories in Objective-C|Creating a New Directory]]
 +
#* [[Working with Directories in Objective-C|Deleting a Directory]]
 +
#* [[Working with Directories in Objective-C|Renaming or Moving a Directory]]
 +
#* [[Working with Directories in Objective-C|Getting a Directory File Listing]]
 +
#* [[Working with Directories in Objective-C|Getting the Attributes of a File or Directory]]<br><br>
 +
# [[Working with Files in Objective-C]]
 +
#* [[Working with Files in Objective-C|Creating an NSFileManager Instance]]
 +
#* [[Working with Files in Objective-C|Checking if a File Exists]]
 +
#* [[Working with Files in Objective-C|Comparing the Contents of Two Files]]
 +
#* [[Working with Files in Objective-C|Checking if a File is Readable/Writable/Executable/Deletable]]
 +
#* [[Working with Files in Objective-C|Moving/Renaming a File]]
 +
#* [[Working with Files in Objective-C|Copying a File]]
 +
#* [[Working with Files in Objective-C|Removing a File]]
 +
#* [[Working with Files in Objective-C|Creating a Symbolic Link]]
 +
#* [[Working with Files in Objective-C|Reading and Writing Files with NSFileManager]]
 +
#* [[Working with Files in Objective-C|Working with Files using the NSFileHandle Class]]
 +
#* [[Working with Files in Objective-C|Creating an NSFileHandle Object]]
 +
#* [[Working with Files in Objective-C|NSFileHandle File Offsets and Seeking]]
 +
#* [[Working with Files in Objective-C|Reading Data from a File]]
 +
#* [[Working with Files in Objective-C|Writing Data to a File]]
 +
#* [[Working with Files in Objective-C|Truncating a File]]<br><br>
 +
# [[Constructing and Manipulating Paths with NSPathUtilities]]
 +
#* [[Constructing and Manipulating Paths with NSPathUtilities|The Anatomy of a Path]]
 +
#* [[Constructing and Manipulating Paths with NSPathUtilities|Finding a Temporary Directory]]
 +
#* [[Constructing and Manipulating Paths with NSPathUtilities|Getting the Current User's Home Directory]]
 +
#* [[Constructing and Manipulating Paths with NSPathUtilities|Getting the Home Directory of a Specified User]]
 +
#* [[Constructing and Manipulating Paths with NSPathUtilities|Extracting the Filename from a Path]]
 +
#* [[Constructing and Manipulating Paths with NSPathUtilities|Extracting the Filename Extension]]
 +
#* [[Constructing and Manipulating Paths with NSPathUtilities|Standardizing a Path]]
 +
#* [[Constructing and Manipulating Paths with NSPathUtilities|Extracting the Components of a Path]]<br><br>
 +
# [[Copying Objects in Objective-C]]
 +
#* [[Copying Objects in Objective-C|Objects and Pointers]]
 +
#* [[Copying Objects in Objective-C|Copying an Object in Objective-C using the <NSCopying> Protocol]]
 +
#* [[Copying Objects in Objective-C|<NSCopying> Protocol and copyWithZone Method Implementation]]
 +
#* [[Copying Objects in Objective-C|Performing a Deep Copy]]<br><br>
 +
# [[Using Objective-C Preprocessor Directives]]
 +
#* [[Using Objective-C Preprocessor Directives|The #define Statement]]
 +
#* [[Using Objective-C Preprocessor Directives|Creating Macros with the #define Statement]]
 +
#* [[Using Objective-C Preprocessor Directives|Changing the Objective-C Language with #define]]
 +
#* [[Using Objective-C Preprocessor Directives|Undefining a Definition with #undef]]
 +
#* [[Using Objective-C Preprocessor Directives|Conditional Compilation]]
 +
#* [[Using Objective-C Preprocessor Directives|The #import Directive]]<br><br>
 +
</td>
 +
<td valign="top">
 +
<htmlet>adsdaqbox</htmlet>
 +
</td>
 +
</tr>
 +
</table>
 +
 +
<htmlet>objc</htmlet>
 +
 +
 +
<htmlet>ezoicbottom</htmlet>
 +
<hr>
 +
<table border="0" cellspacing="0" width="100%"><tr>
 +
<td width="20%"><td align="center">[[Objective-C 2.0 Essentials|Table of Contents]]<td width="20%" align="right">[[About Objective-C Essentials|Next]]</td>
 +
<tr>
 +
<td width="20%"><td align="center"><td width="20%" align="right">About Objective-C Essentials</td>
 +
</table>

Latest revision as of 15:38, 18 November 2016

Table of ContentsNext
About Objective-C Essentials

Purchase the full edition of this Objective-C book in Print ($14.99) or eBook ($12.99) format
Objective-C 2.0 Essentials Print and eBook (ePub/PDF/Kindle) editions contain 31 chapters.

Buy Print

The Objective-C 2.0 Essentials online book contains 34 chapters of detailed information intended to provide everything necessary to gain proficiency as an Objective-C programmer for both Mac OS X and iPhone development.


Objective-C 2.0 Essentials - Second Edition

© 2012 Neil Smyth / Payload Media. This eBook is provided for personal use only. Unauthorized use, reproduction and/or distribution strictly prohibited. All rights reserved.


Table of Contents

  1. About Objective-C Essentials
  2. The History of Objective-C
  3. Installing Xcode and Compiling Objective-C on Mac OS X
  4. Installing and using GNUstep and Objective-C on Windows
  5. Installing and Using GNUstep and Objective-C on Linux
  6. Building and Installing GNUstep on Linux
  7. Objective-C 2.0 Data Types
  8. Working with Variables and Constants in Objective-C
  9. Objective-C Operators and Expressions
  10. Objective-C 2.0 Operator Precedence
  11. Commenting Objective-C Code
  12. Objective-C Flow Control with if and else
  13. The Objective-C switch Statement
  14. Objective-C Looping - The for Statement
  15. Objective-C Looping with do and while Statements
  16. An Overview of Objective-C Object Oriented Programming
  17. Writing Objective-C Class Methods
  18. Objective-C - Data Encapsulation, Synthesized Accessors and Dot Notation
  19. Objective-C Inheritance
  20. Pointers and Indirection in Objective-C
  21. Objective-C Dynamic Binding and Typing with the id Type
  22. Objective-C Variable Scope and Storage Class
  23. An Overview of Objective-C Functions
  24. Objective-C Enumerators
  25. An Overview of the Objective-C Foundation Framework
  26. Working with String Objects in Objective-C
  27. Understanding Objective-C Number Objects
  28. Working with Objective-C Array Objects
  29. Objective-C Dictionary Objects
  30. Working with Directories in Objective-C
  31. Working with Files in Objective-C
  32. Constructing and Manipulating Paths with NSPathUtilities
  33. Copying Objects in Objective-C
  34. Using Objective-C Preprocessor Directives

Purchase the full edition of this Objective-C book in Print ($14.99) or eBook ($12.99) format
Objective-C 2.0 Essentials Print and eBook (ePub/PDF/Kindle) editions contain 31 chapters.

Buy Print



Table of ContentsNext
About Objective-C Essentials