Skip to content

Instantly share code, notes, and snippets.

@olegam
Created February 6, 2014 15:23
Show Gist options
  • Save olegam/8846283 to your computer and use it in GitHub Desktop.
Save olegam/8846283 to your computer and use it in GitHub Desktop.
AppCode Objective-C Class file template with class extension

Since I always declare private properties in the class implementation file it's nice to have new class implementation files already include a class extension.

This is my template file for doing this. You change the template in Preferences->File and Code Templates->Templates->Objective-C Class.

#parse("Objective-C File Header.m")
#import "${HEADER_FILENAME}"

@interface ${NAME} ()

@end

@implementation ${NAME} #if ($PUT_IVARS_TO_IMPLEMENTATION == "true"){

}
#end


@end
@JanC
Copy link

JanC commented Aug 17, 2016

Cool :) I never thought about modifying the template. Any idea where can I change the value of PUT_IVARS_TO_IMPLEMENTATION ?

@caoer
Copy link

caoer commented Oct 14, 2016

@JanC it's in 'Code Style | Code Generation | Put ivars to implementation'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment