How do I create a category in Xcode 6 or higher?
They didn't forget. They just moved it without telling anyone.
Click
File
->New
->File
Select
Objective-C file
underSources
iniOS
orMac OS
respectively and Click NextNow under
File Type:
choose eitherCategory
,Protocol
, orExtension
PS. Under File Name:
whatever you type here will be either the Category
, Protocol
, or Extension
Name.
To create CategoryBaseClass+CategoryName.m/.h:
- File → New → File... or use ⌘N.
- Select Objective-C File.
- Type in category name, select File Type: Category, and then select the base class.
- Complete the flow to create the category.