上一页 1 2 3 4 5 6 7 8 ··· 10 下一页

ios programming (3rd) notes

摘要: OwnershipWhen an object has an instance variable that points to another object , the object with the pointer is said to own the object being pointed to.When a method(function) has a local variable that points to an object, that method is said to own the object being pointed to.Recall that a collecti 阅读全文
posted @ 2012-07-13 09:17 grep 阅读(284) 评论(0) 推荐(0) 编辑

Cocoa Snippet

摘要: Factory+ (BrandingFactory *) factory{#if defined (USE_ACME)return [[[AcmeBrandingFactory alloc] init] autorelease];#elif defined (USE_SIERRA)return [[[SierraBrandingFactory alloc] init] autorelease];#elsereturn nil;#endif}Copy- (id)copyWithZone:(NSZone *)zone{Dot *dotCopy = [[[self class] allocWithZ 阅读全文
posted @ 2012-07-12 22:10 grep 阅读(165) 评论(0) 推荐(0) 编辑

Class Clusters(Abstract Factory)

摘要: http://developer.apple.com/library/ios/#documentation/General/Conceptual/CocoaEncyclopedia/ClassClusters/ClassClusters.htmlThe Class Clusters pattern presents a simple interface to a complex underlying implementation.The division of an interface between primitive and derived methods makes creating s 阅读全文
posted @ 2012-07-09 20:28 grep 阅读(260) 评论(0) 推荐(0) 编辑

awakeFromNib and applicationDidFinishLaunching

摘要: awakeFromNib is called on every object that is initialized or referenced from within a nib file.In this nib file, I have references to two pieces of custom code: The Window Controller and the Window itself. So which of these two gets the awakeFromNib call? Both do.Specifically, when a nib file has c 阅读全文
posted @ 2012-07-08 20:18 grep 阅读(409) 评论(0) 推荐(0) 编辑

Invocation

摘要: The NSInvocation class is designed to represent an Objective-C message. NSInovation instances encapsulates all the attributes of an Objective-C message. They know the message's receive, the message name (both the selector and method signature), and all the message's arguments. After invoking 阅读全文
posted @ 2012-07-08 14:57 grep 阅读(590) 评论(0) 推荐(0) 编辑

Associative Storage

摘要: It organizes data and keys so that data can be quickly and easily accessed using the corresponding keys. Associative Storage promotes flexibility and runtime storage efficiency.The objects stored in a dictionary are retained when they are added to the collection and released when they are removed. T 阅读全文
posted @ 2012-07-08 14:18 grep 阅读(145) 评论(0) 推荐(0) 编辑

outlet,target,action

摘要: an outlet is an instance that stores a reference (pointer) to another object such as a user interface object.The IBOutlet macro is defined in NSNibDeclarations.h, which is part of Cocoa's application kit framework, and c preprocessor replaces it with a single space character whenever it's en 阅读全文
posted @ 2012-07-08 11:42 grep 阅读(260) 评论(0) 推荐(0) 编辑

cs english sentence

摘要: xxx isa common recurring problem.the first shortcoming is the amount of code you will write.One of these two solutions would be used to eliminatethe compiler warning.The primary motivation for using class clusters in a framework is to shield application programmers from framework implementation comp 阅读全文
posted @ 2012-07-08 11:22 grep 阅读(185) 评论(0) 推荐(0) 编辑

design keywords :) 麻利的侃

摘要: reuse,reusable,flexibility,coupling,mvc,encapsulate,inheritance(subclass),composite,delegate,datasource,block,hook,callback,api,spi,constrain,kiss,placeholder,trade-off,simplicity,glue,mediate,convention,metaphor,rationale,streamline,housekeeping,pop off,backwards compatibility,introspect,weaken,inc 阅读全文
posted @ 2012-07-08 10:40 grep 阅读(193) 评论(0) 推荐(0) 编辑

Fast enumerate

摘要: The resulting syntax is more aesthetic and better reflects the programmer's intent.you can use the reverse NSEnumerator object itself for Fast Enumeration.for (id object in [someArray reverseObjectEnumerator]) 阅读全文
posted @ 2012-07-07 09:05 grep 阅读(138) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 10 下一页