XCode not creating .h file

你离开我真会死。 提交于 2019-12-24 03:47:08

问题


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.


回答1:


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

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



来源:https://stackoverflow.com/questions/26085220/xcode-not-creating-h-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!