Xcode: view references for a variable?

后端 未结 5 2069
天涯浪人
天涯浪人 2020-12-31 06:35

I am new to Xcode. I am not sure if there is a way to view a variable\'s references just like \"Find all references\" in Visual Studio by right click on a var?

For e

5条回答
  •  孤城傲影
    2020-12-31 07:28

    I was looking for similar option. I do not know why XCode did not included that. But there is a work around I use until Apple give that option in XCode.

    Try this in the source code (.m) file,

    Select the symbol, right click -> Refactor -> Rename 
    -> Give a name whatever you wish, then press Preview. 
    

    Now you can find all the references. Now you can Cancel it or do not rename it. :)

提交回复
热议问题