Hypnoz
Hypnoz

Reputation: 1136

Rename in XCode wrtting C++

when i choose file, and find refactor->rename, it indicate Xcode can only refactor C or Object-C code. is that mean i can never change my file name?

Of course, if i directly change file name in disk, that will give me error.

Upvotes: 2

Views: 4029

Answers (2)

Fred
Fred

Reputation: 457

To rename a C++ file in Xcode as of version 9 you can either

  • slow press a file twice and rename it the old fashion way (@Karthik)
  • Have the file selected at the left pane and hit tab or enter

You have to fix all the references yourself after renaming C++ files.

Upvotes: 0

Karthik T
Karthik T

Reputation: 31952

You can certainly change it the old fashioned way. Slow double tapping a file name in the Project tree lets me rename it. After that you just need to fix all references to this file (compile -> fix errors) and you are done.

Upvotes: 3

Related Questions