2

Always, when i create ViewController, i have this :

#import "SomeVCC.h"
@interface SomeVC ()

@end

@implementation SomeVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end

And often i need some cleaner version, like this:

#import "SomeVC.h"
@interface SomeVC ()

@end

@implementation SomeVC
#pragma mark - LifeCycle
- (void)viewDidLoad
{
    [super viewDidLoad];
}

@end

How to change apple's or create my own viewContoller template? I have founded some templates using alcatraz, but they are not right for me.

Zaporozhchenko Oleksandr
  • 4,660
  • 3
  • 26
  • 48
  • There's already a whole answer thread on this here: http://stackoverflow.com/questions/33720/change-templates-in-xcode. I'd suggest searching next time :) – John Rogers Apr 28 '15 at 05:06

1 Answers1

1

Clone the templates you want to have customized variants of. Then change their names and the information in them. Finally, put them in the appropriate location in your 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 they won't be overwritten when you install new developer tools, and you can tweak them to your heart's content.

Rahul Mane
  • 1,005
  • 18
  • 33
ammar shahid
  • 411
  • 4
  • 17