Effective Objective C 2.0编写高质量iOS与OS X代码的52个有效方法-(英文版) 目录
前言致谢关于作者Chapter 1: Accustoming Yourself to Objective-CItem 1: Familiarize Yourself with Objective-C's RootsItem 2: Minimize Importing Headers in HeadersItem 3: Prefer Literal Syntax over the Equivalent MethodsItem 4: Prefer Typed Constants to Preprocessor#defineItem 5: Use Enumerations for States, Options, and Status CodesChapter 2: Objects, Messaging, and the RuntimeItem 6: Understand PropertiesItem 7: Access Instance Variables Primarily Directly WhenAccessing Them InternallyItem 8: Understand Object EqualityItem 9: Use the Class Cluster Pattern to Hide Implementation DetailItem 10: Use Associated Objects to Attach Custom Data to Existing ClassesItem 11: Understand the Role ofobjc_msgSendItem 12: Understand Message ForwardingItem 13: Consider Method Swizzling to Debug Opaque MethodsItem 14: Understand What a Class Object IsChapter 3: Interface and API DesignItem 15: Use Prefix Names to Avoid Namespace ClashesItem 16: Have a Designated InitializerItem 17: Implement thedescription MethodItem 18: Prefer Immutable ObjectsItem 19: Use Clear and Consistent NamingItem 20: Prefix Private Method NamesItem 21: Understand the Objective-C Error ModelItem 22: Understand theNSCopying ProtocolChapter 4: Protocols and CategoriesItem 23: Use Delegate and Data Source Protocols for Interobject CommunicationItem 24: Use Categories to Break Class Implementations into Manageable SegmentsItem 25: Always Prefix Category Names on Third-Party ClassesItem 26: Avoid Properties in CategoriesItem 27: Use the Class-Continuation Category to Hide Implementation DetailItem 28: Use a Protocol to Provide Anonymous ObjectsChapter 5: Memory ManagementItem 29: Understand Reference CountingItem 30: Use ARC to Make Reference Counting EasierItem 31: Release References and Clean Up Observation State Only indeallocItem 32: Beware of Memory Management with Exception-Safe CodeItem 33: Use Weak References to Avoid Retain CyclesItem 34: Use Autorelease Pool Blocks to Reduce High-Memory WaterlineItem 35: Use Zombies to Help Debug Memory-Management ProblemsItem 36: Avoid UsingretainCountChapter 6: Blocks and Grand Central DispatchItem 37: Understand BlocksItem 38: Createtypedefs for Common Block TypesItem 39: Use Handler Blocks to Reduce Code SeparationItem 40: Avoid Retain Cycles Introduced by Blocks Referencing the Object Owning ThemItem 41: Prefer Dispatch Queues to Locks for SynchronizationItem 42: Prefer GCD toperformSelector and FriendsItem 43: Know When to Use GCD and When to Use Operation QueuesItem 44: Use Dispatch Groups to Take Advantage of Platform ScalingItem 45: Usedispatch_once for Thread-Safe Single-Time Code ExecutionItem 46: Avoiddispatch_get_current_queueChapter 7: The System FrameworksItem 47: Familiarize Yourself with the System FrameworksItem 48: Prefer Block Enumeration tofor LoopsItem 49: Use Toll-Free Bridging for Collections with Custom Memory-Management SemanticsItem 50: UseNSCache Instead ofNSDictionary for CachesItem 51: Keepinitialize andload Implementations LeanItem 52: Remember thatNSTimer Retains Its TargetIndex
Effective Objective C 2.0编写高质量iOS与OS X代码的52个有效方法-(英文版) 内容简介
本书不是在讲 Objective-C 语言的基础知识,而是要讲如何高效运用这门语言。全书共分 7 章,从7 个方面总结和探讨了 Objective-C 编程中 52 个鲜为人知又容易被忽视的特性。第 1 章从整体上讲解Objective-C 的核心概念;第 2 章讲述了与面向对象语言的重要特征(对象、消息和运行期)相关的行为;第 3 章介绍了如何编写适合与 Objective-C 搭配的类;第 4 章讲述协议与分类相关的技巧;第 5 章介绍内存管理的注意事项;第 6 章介绍块与大中枢派发(Grand Central Dispatch)相关的技巧;第 7 章总览了 Cocoa 和 Cocoa Touch 系统框架,并深入研究了其中的某些类。