27

Working on iOS7+8 with xcode6 and running into a weird issue...

I created the first viewController and thats fine, now I created another and I am trying to set that new viewController to a new class....

in xCode4 all I had to do was create new-->Objective C Class....but I don't see this option in xcode6. All I see is this swift stuff, but I want an objective C class!

I see I can make a new objective c file, but that doesn't really help me. I want to create both the .h and .m files.

Thanks in advance,

4 Answers 4

53

Create Cocoa touch file - that will generate both .h and .m, and you can choose either with or without a xib generated. Be sure to pick Objective-c as language - now it lets you pick either Objective-c or Swift.

Sign up to request clarification or add additional context in comments.

Comments

13

I had this same issue yesterday. The solution is simple:

1) File > New

2) Under IOS, click "Source"

3) Select "Cocoa Touch Class"

And then create your Class as you used to in Xcode 4. Now you should see your .h and .m files.

Comments

5

File → New → File... or use ⌘N.

Select Coccoa Touch Class

enter image description here

enter image description here

Comments

0

New File -> select source under iOS-> select cocoa touch class ->click on Next Put the class name -> click on Next-> selectddestination folder and click on create. Two file will create with. m and. h

It May helps you.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.