Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add both .h and .m files in Xcode

Tags:

xcode

When I add a new file in Xcode 6.3.2 I see templates for the .m and .h file but how do you add both at once?

I'm sure there used to be a way of adding both at once.

like image 575
Snowcrash Avatar asked Dec 19 '22 03:12

Snowcrash


2 Answers

The option has been moved into the more generic "Cocoa Touch Class" template, which allows you to make the class in either Objective-C or Swift.

Cocoa touch class

Complete the name of your pair of files with the default prefix filled-in for you. Choose the superclass such as NSObject. Choose the Objective-C language. Click the Next button, then choose the folder location where to save your pair of new .h and .m files.

enter image description here

like image 52
Kevin Avatar answered Jan 05 '23 17:01

Kevin


You can do this by add new file and "Cocoa Class"

like image 28
Hancz Avatar answered Jan 05 '23 19:01

Hancz