Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
107 lines (83 sloc) 1.8 KB
snippet alloc
[[${1:foo} alloc] init]${2};${3}
snippet array
NSMutableArray *${1:array} = [NSMutable array];${2}
snippet bez
NSBezierPath *${1:path} = [NSBezierPath bezierPath];${2}
snippet cat
@interface ${1:NSObject} (${2:Category})
@end
@implementation $1 ($2)
${3}
@end
snippet cati
@interface ${1:NSObject} (${2:Category})
${3}
@end
snippet cli
@interface ${1:ClassName} : ${2:NSObject}
{${3}
}
${4}
@end
snippet dict
NSMutableDictionary *${1:dict} = [NSMutableDictionary dictionary];${2}
snippet forarray
unsigned int ${1:object}Count = [${2:array} count];
for (unsigned int index = 0; index < $1Count; index++)
{
${3:id} $1 = [$2 $1AtIndex:index];
${4}
}
snippet I
+ (void) initialize
{
[[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWIthObjectsAndKeys:
${1}@"value", @"key",
nil]];
}
snippet Imp
#import "${1:`Filename()`.h}"${2}
snippet log
NSLog(@"${1}"${2});${3}
snippet objacc
- (${1:id})${2:thing}
{
return $2;
}
- (void) set$2:($1)
{
$1 old$2 = $2;
$2 = [aValue retain];
[old$2 release];
}
snippet objc
@interface ${1:`Filename('', 'object')`} : ${2:NSObject}
{
}
@end
@implementation $1
- (id) init
{
if (self = [super init])
{${3}
}
return self
}
@end
snippet prop
@property (${1:retain}) ${2:NSSomeClass} *${3:$2};${4}
snippet rel
[${1:foo} release];${2}
snippet ret
[${1:foo} retain];${2}
snippet sel
@selector(${1:method}:)${2}
snippet sm
- (${1:id}) ${2:method}:(${3:id})${4:anArgument}
{
$1 res = [super $2:$4];${5}
return res;
}
snippet syn
@synthesize ${1:NSSomeClass};${2}