Book description
Objective-C Recipes provides a problem solution approach for dealing with key aspects of Objective-C programming, ensuring you have the indispensable reference you need to successfully execute common programming tasks. You will see how to use the unique features of the Objective-C programming language, the helpful features of the Foundation framework, and the benefits of using Objective-J as an alternative. Solutions are available for a range of problems, including:
Application development with Xcode
Working with strings, numbers and object collections
Using foundation classes like NSArray, NSString, NSData and more
Dealing with threads, multi-core processing and asynchronous processing
Building applications that take advantage of dates and timers and memory management
How to use Objective-C on other platforms
Objective-C Recipes is an essential reference for every Objective-C programmer, and offers solutions in a concise and easy-to-follow manner. Matthew Campbell has trained over 800 new iOS developers at the Mobile App Mastery Institute and iOS Code Camp, and here brings his expertise to offer you the ability to use and exploit Objective-C to get the most out of all of your projects.
Table of contents
- Titlepage
- Contents at a Glance
- Contents
- About the Author
- About the Technical Reviewer
- Acknowledgments
- Preface
-
Chapter 1: Application Development
- 1.1 Creating a Terminal Application
- 1.2 Writing to the Console
- 1.3 Creating a New Custom Class
- 1.4 Code Property Assessors
- 1.5 Code Property Assessors with @synthesize
- 1.6 Adding a Class Method to a Custom Class
- 1.7 Adding an Instance Method to a Custom Class
- 1.8 Extending a Class with a Category
- 1.9 Creating a Mac Window-Based Application from Terminal
- 1.10 Adding a User Control to a Mac Application
- 1.11 Creating a Mac Window-Based Application From Xcode
- 1.12 Creating an iOS Application from Xcode
- 1.13 Adding User Controls to an iOS Application with Target-Action
- 1.14 Adding User Controls to an iOS Application with Delegation
-
Chapter 2: Working With Strings and Numbers
- 2.1 Creating a String Object
- 2.2 Reading Strings from Files on a Mac
- 2.3 Reading Strings from Files on iOS
- 2.4 Writing Strings to Files on a Mac
- 2.5 Writing Strings To Files On iOS
- 2.6 Comparing Strings
- 2.7 Manipulating Strings
- 2.8 Searching Through Strings
- 2.9 Localizing Strings
- 2.10 Converting Numbers to Strings
- 2.11 Converting Strings to Numbers
- 2.12 Formatting Numbers
-
Chapter 3: Working with Object Collections
- 3.1 Creating an Array
- 3.2 Referencing Objects in Arrays
- 3.3 Obtaining the Array Count
- 3.4 Iterating Through an Array
- 3.5 Sorting an Array
- 3.6 Querying an Array
- 3.7 Manipulating Array Contents
- 3.8 Saving Arrays to the File System
- 3.9 Reading Arrays from the File System
- 3.10 Creating a Dictionary
- 3.11 Referencing Objects in Arrays
- 3.12 Obtaining the Dictionary Count
- 3.13 Iterating Through a Dictionary
- 3.14 Manipulating Dictionary Contents
- 3.15 Saving Dictionaries to the File System
- 3.16 Reading Dictionaries from the File System
- 3.17 Creating a Set
- 3.18 Obtaining the Set Count
- 3.19 Comparing Sets
- 3.20 Iterating Through a Set
- 3.21 Manipulating Set Contents
-
Chapter 4: File System
- 4.1 Referencing and Using the File Manager
- 4.2 Getting Mac System Directory References
- 4.3 Getting Key iOS Directory References
- 4.4 Getting File Attributes
- 4.5 Getting the List of Files and Sub-Directories in a Directory
- 4.6 Managing Directories
- 4.7 Managing Files
- 4.8 Checking File Status
- 4.9 Changing File Attributes
- 4.10 Using Delegation with NSFileManager
- 4.11 Working with Data Using NSData
- 4.12 Caching Content with NSCache
- Chapter 5: Working With Dates, Times, and Timers
-
Chapter 6: Asynchronous Processing
- 6.1 Running a Process in a New Thread
- 6.2 Communicating Between the Main Thread and a Background Thread
- 6.3 Locking Threads with NSLock
- 6.4 Locking Threads with @synchronized
- 6.5 Asynchronous Processing with Grand Central Dispatch (GCD)
- 6.6 Using Serial Queues in GCD
- 6.7 Implement Asynchronous Processing Using NSOperationQueue
- Chapter 7: Consuming Web Content
- Chapter 8: Memory Management
- Chapter 9: Working with Object Graphs
-
Chapter 10: Core Data
- 10.1 Adding Core Data Support to an Application
- 10.2 Adding an Entity Description
- 10.3 Adding a Managed Object to an Application
- 10.4 Adding a Managed Object to Core Data
- 10.5 Retrieving Objects from the Data Store
- 10.6 Posting Changes to the Data Store
- 10.7 Using One-To-One Relationships with Core Data
- 10.8 Using One-To-Many Relationships with Core Data
- 10.9 Managing Data Store Versioning
- Chapter 11: Objective-C Beyond Mac and iOS
- Index
Product information
- Title: Objective-C Recipes: A Problem-Solution Approach
- Author(s):
- Release date: July 2012
- Publisher(s): Apress
- ISBN: 9781430243717
You might also like
book
Objective-C Quick Syntax Reference
The is a condensed code and syntax reference to the popular Objective-C programming language, which is …
book
Objective-C
A soup-to-nuts guide on the Objective-C programming language Objective-C is the language behind Cocoa and Cocoa …
book
iOS 7 Programming Cookbook
Overcome the vexing issues you’re likely to face when creating apps for the iPhone, iPad, or …
book
More iPhone Development with Objective-C
If you are looking to extend your iOS programming skills beyond the basics then More iPhone …