Reputation: 317
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,
Upvotes: 27
Views: 28259
Reputation: 3523
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.
Upvotes: 0
Reputation: 3560
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.
Upvotes: 13
Reputation: 7870
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.
Upvotes: 53