Introduction

The Objective-C programming language continues to grow in popularity and usage. This is due to the power and ease-of-use of the language itself, along with the numerous features that continue to be added to the platform. Many programmers have developed a basic knowledge of the language and now want to further their expertise. Pro Objective-C will take you to the next level..

What This Book Is

Pro Objective-C provides an in-depth, comprehensive guide to the language, its runtime, and key APIs. It explains the key concepts of Objective-C in a clear, easy-to-understand manner, along with detailed coverage of its more complex features. Its key topics include:

  • Objective-C fundamentals and key language elements
  • The Objective-C runtime system
  • Foundation Framework APIs
  • Objective-C advanced language features

The book also includes numerous practical examples—code excerpts and complete applications—that demonstrate how to apply in code what you’re learning.

Each topic is covered clearly, concisely, and is packed with the details you need to develop Objective-C code effectively. The most important features are given in-depth treatment, and each chapter contains numerous examples that clearly demonstrate the use of Objective-C.

Who This Book Is For

This book is geared toward intermediate to advanced developers who already have some Objective-C experience. It’s also great for developers who have not used Objective-C but have some C programming experience and also understand object-oriented programming.

What You Need

Before you begin writing Objective-C code for the Apple OS X and iOS platforms, you’ll need an Intel-based Mac computer (MacBook, iMac, Mac Pro, etc.) running OS X Mountain Lion (OS X 10.6.8) or later. You will also need Xcode, Apple’s toolset for iOS and Mac software development. Chapter 1 provides instructions for obtaining and installing Xcode.

What’s in This Book

Here’s a brief overview of the chapters of this book.

Chapter 1

This chapter introduces the Objective-C programming language and development environment. You will also download and install Xcode and write your first Objective-C program.

Chapter 2

Chapter 2 is all about classes, the major building block for object-oriented programming. It covers the key elements and unique features Objective-C provides for developing classes.

Chapter 3

In Chapter 2 you learned how to create classes; in this chapter you learn how to use them. Specifically, you learn about the concepts and details around Objective-C object creation, initialization, and messaging.

Chapter 4

Proper memory management is key to developing programs that perform both correctly and efficiently. In this chapter you’ll learn how computer memory is allocated and released for Objective-C programs, the Objective-C memory model, and how to write programs that perform memory management properly.

Chapter 5

Objective-C includes a preprocessor that is used to translate source files prior to compilation. In this chapter you will learn how the preprocessor works and how the preprocessor language is used in Objective-C source files.

Chapter 6

As you learned earlier in this book, ARC is the recommended approach for Objective-C memory management. In this Expert Section chapter you will learn some of the finer details surrounding ARC memory management, as well as how to use ARC with toll-free bridged objects.

Chapter 7

Chapter 7 begins our study of the Objective-C runtime system by providing an in-depth exploration of the dynamic features of the Objective-C language. This includes runtime type determination, method resolution, object introspection, dynamic code loading, and other features.

Chapter 8

In Chapter 8 you will learn about the architecture and design of the Objective-C runtime system, and how its dynamic features are implemented. The chapter also shows how your code interacts with the runtime, both at compile time and during program execution.

Chapter 9

In this Expert Section chapter you will enhance your knowledge of the runtime system by developing several example programs that exercise some of its key features and APIs.

Chapter 10

In Chapter 10, you will learn about Foundation Framework classes that provide common, general-purpose functionality required by most Objective-C programs. The classes examined include root classes, strings, value objects, collections, XML data processing, and predicates.

Chapter 11

In Chapter 11, you will explore Foundation Framework classes that provide system services. These classes implement a variety of operating system services for networking, file management, interprocess communication, system information retrieval, text processing, threading, and concurrency.

Chapter 12

Chapter 12 covers several Foundation Framework classes that provide specialized system services, which implement functionality to support event-driven programming, object persistence, and distributed programming.

Chapter 13

In this chapter you’ll learn about the Foundation Framework’s general-purpose functions, data types, and constants, a set of APIs that provide a variety of essential functionality for Objective-C software development.

Chapter 14

Chapter 14 is an Expert Section dedicated to error handling. You will learn about the causes of runtime errors, the programming options for error handling, and the Foundation Framework APIs for handling errors and exception conditions.

Chapter 15

In Chapter 15 you will learn how to program with blocks, a powerful extension to the Objective-C language. It explores block syntax and semantics, block memory management, how to develop blocks in your own code, and how to use blocks in existing APIs.

Chapter 16

Objective-C literals are a recent addition to the language. In this chapter you will learn their syntax, associated semantics, and general guidelines for usage.

Chapter 17

The Objective-C platform provides a variety of language extensions, APIs, and operating system services that are designed to enable you to safely and efficiently implement concurrent programming. In Chapter 17 you will explore this technology in depth.

Chapter 18

In Chapter 18 you will learn the fundamentals of key-value programming (key-value coding, key-value observing). The chapter includes relevant implementation details, and also shows how to use key-value programming in your code.

Appendix A

Appendix A provides a concise summary of the basic elements of the Objective-C language. Its scope is the Objective-C language extensions to ANSI C.

Appendix B

Appendix B presents an in-depth exploration of Xcode, including its basic concepts, major functional elements, and how to use its key features.

Appendix C

Appendix C provides a detailed overview of LLDB, the Xcode debugger. You will learn the architecture and design of LLDB, briefly review how it’s integrated with Xcode, and learn how to efficiently debug programs in Xcode with LLDB.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.229.111