Skip to content

Instantly share code, notes, and snippets.

@benvium
Created April 21, 2012 08:13
Show Gist options
  • Select an option

  • Save benvium/2435530 to your computer and use it in GitHub Desktop.

Select an option

Save benvium/2435530 to your computer and use it in GitHub Desktop.
AppCode Live Template to generate a UIViewController delegate
Variables set as:
name expression default value
---------------------------------
class CLASS
class2 decapitalize(class)
---------------------------------
@class $class$;
@protocol $class$Delegate <NSObject>
-(void)$class2$DidSave:($class$*) sender;
-(void)$class2$DidCancel:($class$*) sender;
$end$
@end
---------------------------------
Output:
Type in FooBarViewController.
@class FooBarViewController;
@protocol FooBarViewControllerDelegate <NSObject>
-(void)fooBarViewControllerDidSave:(FooBarViewController*) sender;
-(void)fooBarViewControllerDidCancel:(FooBarViewController*) sender;
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment