XCode not creating .h file

2019-07-15 10:36发布

I am using Xcode 6.0.1

I created a new project which automatically generated .h and .m files .

When i try to add a new Objective-c file, it is only creating .m file. .h file is not getting generated. I tried all preferences, nowhere i found an option which says "Generate .h file".

Out of curiosity i checked Library/Developer/Xcode/Templates where only one folder exists.

/Users/rajeshreddy/Library/Developer/Xcode/Templates Rajeshs-MacBook-Pro:Templates rajeshreddy$ ls File Templates cocos2d v3.x Rajeshs-MacBook-Pro:Templates rajeshreddy$

Is there any setting which i can enable to generate .h file.

标签: ios xcode xcode6
1条回答
ら.Afraid
2楼-- · 2019-07-15 10:56

You need to create a new CocoaTouch class, like this:

Create a new cocoa touch class

And that should give you both a .m and a .h file.

查看更多
登录 后发表回答