0

if I remember correctly, in xCode 5 and below, the "New File" option for project navigator included a template to create an extension for an existing class. This option was next to "Cocoa Touch Class" and allowed to enter a base class name. The generated file had a form like "NSString+JSON.h"

How do I create class extensions in xCode 6? Do I start with a class file and then modify it and it's name to include category name?

enter image description here

Alex Stone
  • 46,408
  • 55
  • 231
  • 407

1 Answers1

2

The process is similar to this question I answered:

How to create Objective-C Protocol in new version of XCode Version 6.0.1 (6A317) for iOS

Select New File > Objective-C File > Choose Extension from the dropdown. enter image description here

Community
  • 1
  • 1
KirkSpaziani
  • 1,962
  • 12
  • 14