English | 2013 | ISBN: 978-0321917010 | 320 Pages | EPUB | 10 MB
Effective Objective-C 2.0 will help you harness all of Objective-C’s expressive power to write OS X or iOS code that works superbly well in production environments. Using the concise, scenario-driven style pioneered in Scott Meyers’ best-selling Effective C++, Matt Galloway brings together 52 Objective-C best practices, tips, shortcuts, and realistic code examples that are available nowhere else.
Through real-world examples, Galloway uncovers little-known Objective-C quirks, pitfalls, and intricacies that powerfully impact code behavior and performance. You’ll learn how to choose the most efficient and effective way to accomplish key tasks when multiple options exist, and how to write code that’s easier to understand, maintain, and improve. Galloway goes far beyond the core language, helping you integrate and leverage key Foundation framework classes and modern system libraries, such as Grand Central Dispatch.
- Optimizing interactions and relationships between Objective-C objects
- Mastering interface and API design: writing classes that feel “right at home”
- Using protocols and categories to write maintainable, bug-resistant code
- Avoiding memory leaks that can still occur even with Automatic Reference Counting (ARC)
- Writing modular, powerful code with Blocks and Grand Central Dispatch
- Leveraging differences between Objective-C protocols and multiple inheritance in other languages
- Improving code by more effectively using arrays, dictionaries, and sets
- Uncovering surprising power in the Cocoa and Cocoa Touch frameworks