Reputation: 23
When I try to create a .m file from the file menu, it prompts me for choosing a template from the several types mentioned - Objective-C class
, Objective-C category
, Objective-C protocol
, etc.. Which one should be preferred?
I am fairly new to Objective-C as well as Xcode, so pardon me if this question is too obvious.
Upvotes: 1
Views: 9325
Reputation: 3031
If you want to create just an empty .m file, you can do so following these steps (Xcode 5.1.1):
Upvotes: 1
Reputation: 4767
Objective-C class
and rename the new.m
alone
to match your old.h
and remove the newly added new.h
file.Objective-C class
and copy your code from old.h
to new.h
fileUpdate as per comments: I see you are trying to add .m for the MAC sdk library, which is not possible.
You may have to consider using Categories
extending the existing class methods.
Upvotes: 2