Leem.fin Leem.fin - 4 months ago 28
iOS Question

Xcode 7 only generates .m file, no .h file

My Xcode version is 7.3.1.

I want to create an Objective-C class file with

.h
&
.m
files.

I choose iOS source & Objective-C File like below:

enter image description here

Then, I want to select "Objective-C class" in file type, but it isn't there:

enter image description here

So, I select "Empty file" as the file type. But it only creates a
.m
file, there isn't a corresponding
.h
file.

Do I have to create header file & implementation files separately, manually? I remember I used to just create the Objective-C class file, then both header & implementation file were generated for me.

Answer

you need to for Cocoa Touch Class for ex.

enter image description here

and you get the sub type of

enter image description here