temporary_user_name
temporary_user_name

Reputation: 37068

What do I name the file to create a category for NSString?

My interface, for example, looks like this:

@interface NSString (CategoryName)

And then this for implementation--

@implementation NSString (CategoryName)

But what do I actually call the files? NSString.m/.h ? Does it matter?

Upvotes: 2

Views: 95

Answers (1)

Mick MacCallum
Mick MacCallum

Reputation: 130193

It's entirely up to you.

However, the convention is to name them like this.

NSString+CategoryName.h

NSString+CategoryName.m

Upvotes: 7

Related Questions