Effective Objective-C 2.0
Introduction
1.
Accustoming Yourself to Objective-C
1.1.
Familiarize Yourself with Objective-C’s Roots
1.2.
Minimize Importing Headers in Headers
1.3.
Prefer Literal Syntax over the Equivalent Methods
2.
Objects, Messaging, and the Runtime
2.1.
Understand Properties
2.2.
Access Instance Variables Primarily Directly When Accessing Them Internally
2.3.
Understand Object Equality
2.4.
Use Associated Objects to Attach Custom Data to Existing Classes
2.5.
Understand the Role of objc_msgSend
2.6.
Understand Message Forwarding
2.7.
Consider Method Swizzling to Debug Opaque Methods
2.8.
Understand What a Class Object Is
3.
Protocols and Categories
4.
Memory Management
4.1.
Understand Reference Counting
4.2.
Use ARC to Make Reference Counting Easier
4.3.
Release References and Clean Up Observation State Only in dealloc
4.4.
Use Zombies to Help Debug Memory-Management Problems
4.5.
Avoid Using retainCount
5.
The System Frameworks
5.1.
Familiarize Yourself with the System Frameworks
5.2.
Prefer Block Enumeration to for Loops
5.3.
Use Toll-Free Bridging for Collections with Custom Memory-ManagementSemantics
5.4.
Use NSCache Instead of NSDictionary for Caches
5.5.
Keep initialize and load Implementations Lean
5.6.
Remember that NSTimer Retains Its Target
Powered by
GitBook
Effective Objective-C 2.0
Use ARC to Make Reference Counting Easier