I am using a custom template that was defined already by some one. When I use that template, Xcode is not asking for "Class Prefix"
. Because of this, what ever the classes that are created using this template are having a class name as project name followed by the class name we are giving like "SampleProjectViewController.h"
or "SampleProjectViewController.m"
.
Is there a way to add "Class Prefix"
field and use this class prefix, while creating new classes, so that when I create a new class, expected class name would be SPViewController.h
or SPViewController.m
?
Add
com.apple.dt.unit.prefixable
to the Ancestors, it will automatically add the dialog. Then, use___VARIABLE_classPrefix:identifier___
as a replacement string. Eg. let's say you have a class called Foo:Files don't need to have that long prefix, you can simply do that in your Definitions by using something like
___VARIABLE_classPrefix:identifier___Foo.m
as the key andFoo.m
as thePath
(or however your naming works).