JimZ
JimZ

Reputation: 1202

How to copy both .h & .m files in Xcode, and other files?

Sometimes I have to make another class very similar with a existed one, I know it's against OO design but I have to violate it. But when I select the file and press command+c and +v, nothing happened and even the "Edit" list in menu cannot make Copy/Paste.

Even other plist file cannot be directly copied in Xcode. So I have to make a new one and copy/past all the code from the existed one. Is there a better way to do this ?

Thanks guys :)

Upvotes: 3

Views: 1215

Answers (1)

Bryan Luby
Bryan Luby

Reputation: 2567

Select a file in Xcode and select File > Duplicate.... Then give the new file a unique name. All of the code from the duplicated file will be copied into the new file.

Upvotes: 5

Related Questions