![](https://csdnimg.cn/release/download_crawler_static/7837555/bg11.jpg)
deep into the creation of some interesting app, but who are stymied in a way that reveals
quite clearly that they are unfamiliar with the basics of the very world in which they are
so happily cavorting.
It is this state of affairs that has motivated me to write this book, which is intended to
ground the reader in the fundamentals of iOS. I love Cocoa and have long wished to
write about it, but it is iOS and its popularity that has given me a proximate excuse to
do so. Here I have attempted to marshal and expound, in what I hope is a pedagogically
helpful and instructive yet ruthlessly Euclidean and logical order, the principles on
which sound iOS programming rests, including a good basic knowledge of Objective-
C (starting with C itself) and the nature of object-oriented programming, advice on the
use of the tools, the full story on how Cocoa objects are instantiated, referred to, put in
communication with one another, and managed over their lifetimes, and a survey of
the primary interface widgets and other common tasks. My hope, as with my previous
books, is that you will both read this book cover to cover (learning something new often
enough to keep you turning the pages) and keep it by you as a handy reference.
This book is not intended to disparage Apple’s own documentation and example
projects. They are wonderful resources and have become more wonderful as time goes
on. I have depended heavily on them in the preparation of this book. But I also find that
they don’t fulfill the same function as a reasoned, ordered presentation of the facts. The
online documentation must make assumptions as to how much you already know; it
can’t guarantee that you’ll approach it in a given order. And online documentation is
more suitable to reference than to instruction. A fully written example, no matter how
well commented, is difficult to follow; it demonstrates, but it does not teach.
A book, on the other hand, has numbered chapters and sequential pages; I can assume
you know C before you know Objective-C for the simple reason that Chapter 1 precedes
Chapter 2. And along with facts, I also bring to the table a degree of experience, which
I try to communicate to you. Throughout this book you’ll see me referring to “common
beginner mistakes”; in most cases, these are mistakes that I have made myself, in addition
to seeing others make them. I try to tell you what the pitfalls are because I assume that,
in the course of things, you will otherwise fall into them just as naturally as I did as I
was learning. You’ll also see me construct many examples piece by piece or extract and
explain just one tiny portion of a larger app. It is not a massive finished program that
teaches programming, but an exposition of the thought process that developed that
program. It is this thought process, more than anything else, that I hope you will gain
from reading this book.
Conventions Used in This Book
The following typographical conventions are used in this book:
Italic
Indicates new terms, URLs, email addresses, filenames, and file extensions.
Preface | xv
www.it-ebooks.info