How to rename the class name in swift?

前端 未结 7 1881
攒了一身酷
攒了一身酷 2021-02-12 03:33

I am trying to rename the class name in swift but it gives me error Can\'t refector swift code. I want to know the best way to rename a file that will reflect in t

7条回答
  •  佛祖请我去吃肉
    2021-02-12 04:17

    Currently you can't refactor in Swift. However, you can do Find menu > Find and Replace in Project. (Carefully)

    Edit: Xcode 9 allows you to refactor.

    Highlight your property/function and choose Editor Menu -> Refactor -> Rename

    Wait a second or two for Xcode 9 to scan your project for all occurrences and then type the new name.

提交回复
热议问题