Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create new h and m file in Xcode6

Tags:

ios

xcode6gm

I downloaded Xcode6 and create a simple project.When i choose objective C option from new file template it creates a file name with .m extension.I do not know how to create new .h and .m file in Xcode6.any help will be appreciated.thanks in advance

like image 759
user3823935 Avatar asked Sep 12 '14 10:09

user3823935


People also ask

How do I create a .h and M file in Xcode?

To create a Objective-C class, you have to select "Cocoa class". This will create an . h and . m file for you.

What is .h and .m file in Xcode?

h is called the Header file and the . m is called the Implementation file. Together, they form the AppDelegate class.


2 Answers

To create a Objective-C class, you have to select "Cocoa class". This will create an .h and .m file for you. Alternatively you can manually add a "Header file" with the same name, but thats just more work for the same thing.

like image 118
Atomix Avatar answered Sep 23 '22 21:09

Atomix


CMD + N -> iOs -> Cocoa Touch -> Objective-C Class

like image 45
Nicolas Charvoz Avatar answered Sep 24 '22 21:09

Nicolas Charvoz