this question has answer here:
- change templates in xcode 10 answers
always, when create viewcontroller, have :
#import "somevcc.h" @interface somevc () @end @implementation somevc - (void)viewdidload { [super viewdidload]; // additional setup after loading view. } - (void)didreceivememorywarning { [super didreceivememorywarning]; // dispose of resources can recreated. } /* #pragma mark - navigation // in storyboard-based application, want little preparation before navigation - (void)prepareforsegue:(uistoryboardsegue *)segue sender:(id)sender { // new view controller using [segue destinationviewcontroller]. // pass selected object new view controller. } */ @end
and need cleaner version, this:
#import "somevc.h" @interface somevc () @end @implementation somevc #pragma mark - lifecycle - (void)viewdidload { [super viewdidload]; } @end
how change apple's or create own viewcontoller template? have founded templates using alcatraz, not right me.
clone templates want have customized variants of. change names , information in them. finally, put them in appropriate location in account's library/application support
folder, specifically:
file templates: ~/library/application support/developer/shared/xcode/file templates/
target templates: ~/library/application support/developer/shared/xcode/target templates/
project templates: ~/library/application support/developer/shared/xcode/project templates/
that way won't overwritten when install new developer tools, , can tweak them heart's content.