Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Build a Simple iPhone App (iOS7) Refactoring into a Model Creating a Custom Class

Creating Custom Class in Xcode 6

Hi, I downloaded xcode 6 and following video to create custom class. Xcode 6 seams to be different. And options are not same as how to create custom class in xcode 6. Has someone faced this issue.

3 Answers

Adam Berkowitz
Adam Berkowitz
2,673 Points

Go to "New File" - "iOS Source" - "Cocoa Touch Class". Select Next, rename the class, make it a subclass of whatever you like (e.g. NSObject) and select the language (Obj C/Swift). It took me longer than it should've to figure that one out.

Thanks Adam.

Go to the file, under iOS choose the source tab, and select "Objective-C File". If you leave it empty, it should still implement headers for you.

Hello, I did the same as you mentioned. It only generated one implementation file. There is no header file. Is options changed in new Xcode.

Yosemite has some problems updating files in certain folders. So if you're saving the project in your Dropbox folder or the Desktop (in my case, even OSX screenshots require restarting Finder for them to show up), try moving your project files to ~/Documents/ and restart Xcode. It's updating now for me, not an Xcode problem.