use
- Open the following directory and paste the Templates directory for your project directly into it
~/Library/Developer/Xcode
Copy the code
-
Select the following options when creating the project
-
Select when creating a class file
Creating a class file
The effect
- choose
Single View App No Scene
Created is notSceneDelegate
Such documents as blank project
-
The Class files created by selecting Custom Cocoa Touch Class come with some initialization methods and pragma mark tag remarks
Creating a class file
making
About the rough method, not too careful study, is mainly a convenient line, make a unified template, the code will be more standard point.
Xcode itself own template in/Applications/Xcode. The app/Contents/Developer/Platforms/iPhoneOS platform/Developer/Library/Xcode/Templates /
The directory is divided into Project Templates and File Projects for creating Projects and new files, respectively.
Copy this directory to ~/Library/Developer/Xcode and change it in the directory. Xcode is loaded with the same directory as Xcode.
*** No Scene is a new name ***
Changes to what is displayed when creating a file are configured in that file
The same changes that create class files are in File Templates:
Add code to the class file template. For example, if I want to create a class that inherits from NSObjec, add the code in the file shown below.
I’m just adding extension here
*** FILEBASENAMEASIDENTIFIER is automatically replaced with the class name you typed ***
Diy: Xcode template