Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 6: create new Objective C file messed up?

I've got Xcode 6 beta 6 and just wanted to add a new Class to my project.

Now, it is File -> New File -> Objective-C File and I have to choose between Empty File, Category, Protocol and Extension. I just want to make a new class (say HelloWorld) which inherits from let's say NSObject.

Normally the Xcode creates the .m file and auto-creates the .h file, but now it has only created the .m file, named NSObject_HelloWorld.m. No header file has been created and I don't want the naming scheme with Superclass_newClass either.

Did I miss something?

like image 360
Lumpy Avatar asked Aug 28 '14 16:08

Lumpy


1 Answers

everything is the quite similar to what was before, but here is the procedure in Xcode6 beta6:

#1

choose the New and File... or press ⌘N on keyboard:

new


#2

choose iOS, Source then Cocoa Touch Class:

Cocoa Touch Class


#3

type the name of your new class (e.g. HelloWorldClass), it is a subset of the NSObject, and you need to choose the Language as well:

HelloWorldClass

#4

after you saved the files, you can find them in the Project Navigator like I did:

Project Navigator

like image 87
holex Avatar answered Nov 10 '22 11:11

holex