3 #import <${1:Cocoa/Cocoa.h}>${2}
6 #import "${1:`Filename()`.h}"${2}
9 @selector(${1:method}:)${3}
15 ${1:NSObject} *${2:foo} = [${3:$1 alloc}]${4};${5}
18 NSLog(@"${1:%@}"${2});${3}
21 @interface ${1:`Filename('', 'someClass')`} : ${2:NSObject}
31 @interface ${1:`Filename('', 'someClass')`} : ${2:NSObject}
37 @interface ${1:`Filename('', 'someClass')`} : ${2:NSObject}
42 # Class Implementation
44 @implementation ${1:`Filename('', 'someClass')`}
47 snippet @implementation
48 @implementation ${1:`Filename('', 'someClass')`}
53 @protocol ${1:`Filename('$1Delegate', 'MyProtocol')`} ${2:<NSObject>}
57 @protocol ${1:`Filename('$1Delegate', 'MyProtocol')`} ${2:<NSObject>}
64 if (self = [super init]) {
79 IBOutlet ${1:NSSomeClass} *${2:$1};${3}
82 @interface ${1:NSObject} (${2:MyCategory})
85 @implementation $1 ($2)
90 @interface ${1:`Filename('$1', 'NSObject')`} (${2:MyCategory})
95 - (${1:id})${2:method}
101 - (${1:id})${2:method};${3}
102 # IBAction declaration
104 - (IBAction)${1:method}:(${2:id})sender;${3}
107 - (IBAction)${1:method}:(${2:id})sender
111 # awakeFromNib method
119 + (${1:id})${2:method}
123 # Sub-method (Call super)
125 - (${1:id})${2:method}
130 # Accessor Methods For:
133 - (${1:id})${2:thing}
138 - (void)set$2:($1)${3:new$2}
144 # for (object in array)
146 for (${1:Class} *${2:some$1} in ${3:array}) {
150 for (${1:object} in ${2:array}) {
154 unsigned int ${1:object}Count = [${2:array} count];
156 for (unsigned int index = 0; index < $1Count; index++) {
157 ${3:id} $1 = [$2 $1AtIndex:index];
161 unsigned int ${1:object}Count = [${2:array} count];
163 for (unsigned int index = 0; index < $1Count; index++) {
164 ${3:id} $1 = [$2 $1AtIndex:index];
172 @catch (NSException * e) {
179 @catch (${1:exception}) {
187 # @property (Objective-C 2.0)
189 @property (${1:retain}) ${2:NSSomeClass} ${3:*$2};${4}
190 # @synthesize (Objective-C 2.0)
192 @synthesize ${1:property};${2}
195 [[${1:foo} alloc] init${2}];${3}
197 [[${1:foo} alloc] init${2}];${3}
200 [${1:foo} retain];${2}
206 [${1:foo} autorelease];
209 NSAutoreleasePool *${1:pool} = [[NSAutoreleasePool alloc] init];
214 NSException *${1:badness};
215 $1 = [NSException exceptionWithName:@"${2:$1Name}"
224 [[NSColor ${1:blackColor}] set];
227 NSMutableArray *${1:array} = [NSMutable array];${2}
235 NSMutableArray * array;${1}
238 NSMutableDictionary *${1:dict} = [NSMutableDictionary dictionary];${2}
242 NSMutableDictionary ${1}