Chapter 3: Everyday Objective-C
This chapter covers many everyday best practices for Cocoa development, along with several underused features that more developers should be familiar with. Chapter 4 delves deeper into broad Cocoa patterns; here you focus on language features.
You begin by learning the critical Cocoa naming conventions that will improve your code’s readability. Next you are introduced to one of the most exciting new features of iOS 5: Automatic Reference Counting (ARC). This will change how you develop your applications and dramatically reduce bugs and crashes. Then you learn how to best use properties and accessors to manage data in your objects. Finally, you learn about categories, extensions, and protocols, which are all commonly used throughout Cocoa.
By the end of this chapter, you should be very comfortable with the most important language features of Objective-C and feel confident that you are using the best practices of experienced Cocoa developers.
Throughout iOS, naming conventions are extremely important. If you understand how to read them correctly, the names of methods and functions throughout the iOS SDK tell you a great deal about how they are supposed to be called and what they do. Once you’re used to the naming conventions, you can often guess what the name of a class or method is, making it much easier to find the documentation for it. This section touches on some of the most important naming convention rules and those that ...