Database Reference
In-Depth Information
APPENDIX 2
Macros in the Precompiled Header
As you read this topic, you may wonder what I was thinking when I was for-
matting the code. While I have tried to keep it as “natural” as possible, the
code examples throughout the topic have been clarified as much as they can
be within the limitations of print formatting. If you are reading the dead-tree
version of this topic, the formatting avoids line wrapping and lines running
off the page. If you are reading an electronic copy of this topic using iBooks,
Kindle, or another reader, be aware that all of the code is formatted to be less
than 80 characters wide. If you adjust the font size of your reader (or the
orientation) to allow 80 characters in text width, the code should be legible.
In addition to general line wrapping, I frequently declare a variable on one
line and then set it on a following line, with the goal of keeping within 80
characters and maintaining legibility. Please do not feel obligated to duplicate
this code style while working through the code samples. I adopted the style
simply for the sake of clarity within the limitations of print, and your code
has no such limitation.
I've made some other adjustments of which you should be aware. Over the
years, I have created several pieces of code to assist me in my daily develop-
ment. Some of those come in the form of macros, and these macros make an
appearance in this text. To avoid discussing them in bits and pieces, I'll lay
them out here in order to provide a reference.
A2.1 Where Are the Macros?
All the macros that I use are placed in the Prefix.pch file. In recent versions of
Xcode, this file has changed names to ${ProjectName}_Prefix.pch . Actually, I dislike
that naming convention very much; I'm of the strong opinion that consistent
naming of files and consistent placement of those files promotes efficiency.
Therefore, in all of my projects, I rename the precompiled header back to
 
 
 
Search WWH ::




Custom Search